Сервера раст - Добро пожаловать!
Подключайтесь к лучшим серверам Rust, играйте в раст прямо сейчас! Просмотрите статистику и текущих игроков, выберите свой путь в мире выживания на серверах Rust.

Обсуждение на тему: Rust reference



























































































Rust reference
Learn about the rust programming language features, memory model, concurrency model, and more from this book. It covers the latest stable release of rust and provides links to other resources and tools. Learn how to use references and borrowing in rust, which are ways of accessing data without taking ownership of it. See examples of immutable and mutable references, and the rules and restrictions for using them. This document is the primary reference for the rust programming language.
It may include details that are specific to rustc itself, and should not be taken as a specification for the rust language. If you know of other great resources, please submit a pull request!html-версия книги доступна онлайн по адресам httpsdoc. При установке rust с помощью rustup просто запустите rustup docs --book, чтобы её открыть. Some rules in the grammar notably unary operators, binary operators, and keywords are given in a simplified form as a listing of printable strings.
It provides three kinds of material chapters that informally describe each language construct and their use. References can read from (&s) and also write to (&mut s) locations they point to. The dereference r means to use the location r points to ( not the location of or value within r itself) in the example, clone d is created from r , and s(2) written to r. A collection of runnable examples that illustrate various rust concepts and standard libraries.
A single-page rust resource for people who like high information density. Rust cannot reference local variable in return value - but the local variable is passed to the caller. 2 rust borrow checker only complains about borrowing as mutable multiple times when a function that returns a reference with the same lifetime assigned. .