Index
Symbols
- ! (exclamation mark), Declarative Macros
- (), Closures
- 2018 edition of Rust, Rust Version
- 2021 edition of Rust, Rust Version
- ? (question mark) operator, Types, Result<T, E>, Item 3: Prefer Option and Result transforms
over explicit match expressions, Minimal Errors, Building Collections from Result Values, When Explicit Is Better, Declarative Macros, Examples
- π, Item 29: Listen to Clippy
A
- aborting on panic, Item 18: Don’t panic
- abstract classes, Item 2: Use the type system to express common behavior
- abstract syntax tree, Item 28: Use macros judiciously, Item 31: Take advantage of the tooling ecosystem
- access control, Access Control-Borrow Rules
- Adams, Douglas, Item 18: Don’t panic
- adapters, Visibility Syntax
- Add trait, Operator Overloads
- AddAssign trait, Summary
- AddressSanitizer, Fuzz Testing
- afraid, reasons to be, Item 17: Be wary of shared-state parallelism
- aggregate types, Aggregate Types
- algebraic data type, Types, enums with Fields
- aliasing, Borrow Rules
- alignment, Rust References
- all method (on Iterator), Iterator Consumers
- alloc, Beyond Standard Rust
- alloc library, Item 16: Avoid writing unsafe code, Who’s Afraid of the Big Bad Copy?, What to Depend On, Features, alloc
- allocation
- allow attribute, Item 29: Listen to Clippy
- also-implements, More Trait Bounds
- Android, Item 31: Take advantage of the tooling ecosystem, Fallible Allocation
- anonymous lifetimes, Anonymous Lifetimes, Things to Remember
- any method (on Iterator), Iterator Consumers
- Any trait, Item 19: Avoid reflection, Upcasting in Future Versions of Rust
- anyhow crate, Trait Objects
- API guidelines, Item 18: Don’t panic, Visibility Semantics
- ar tool, Linking logistics
- Arc type, Smart Pointer Types, Smart pointers, Data races in Rust, References and Smart Pointers
- array expression, Slices
- array type, Aggregate Types
- arrays, Slices
- as keyword, Item 5: Understand type conversions, Casts
- preferring from / into conversions over as casts, Casts
- AsMut trait, Pointer Traits, More Pointer Traits, Summary, Lifetimes
- AsRef trait, Item 3: Prefer Option and Result transforms
over explicit match expressions, Pointer Traits, More Pointer Traits, Summary, Lifetimes
- assert_eq! macro, Unit Tests
- associated types, Closures, Pointer Traits
- async, Self-referential data structures, Afterword
- as_ptr method, Accessing C Data from Rust
- as_Ref method, Item 3: Prefer Option and Result transforms
over explicit match expressions
- atomics, Conditional Compilation
- attackers, code exposed to, Fuzz Testing
- attribute macros, Attribute macros
- auto traits, Standard marker traits
- automatic type conversions, Item 5: Understand type conversions
B
- B language, Item 9: Consider using iterator transforms
instead of explicit loops
- backward compatibility, Rust Version, Item 13: Use default implementations
to minimize required trait methods, Semver Essentials, Item 23: Avoid wildcard imports, Examples
- Barbarossa, Hector, Preface
- bare-metal Rust, Afterword
- behavior tests, Integration Tests, Testing Advice
- benchmarks, Benchmarks, Things to Remember
- bindgen, Tools to Remember, Code concerns, Accessing C Data from Rust, Item 35: Prefer bindgen to manual FFI mappings-Beyond C
- BitAnd trait, Summary
- BitAndAssign trait, Summary
- BitOr trait, Summary
- BitOrAssign trait, Summary
- BitXor trait, Summary
- BitXorAssign trait, Summary
- black_box function, Benchmarks
- blanket trait implementations, User-Defined Type Conversions, Basic Comparisons
- Bloch, Joshua, Item 19: Avoid reflection, Visibility Semantics, Item 27: Document public interfaces
- bool type, Fundamental Types, Iterator Transforms, Item 29: Listen to Clippy
- bootloaders, Item 33: Consider making library code
no_std compatible
- borrow, Iterator Traits, Item 15: Understand the borrow checker
- borrow checker, Preface, Rust References, Rust References, Concepts, Item 15: Understand the borrow checker-Things to Remember, Data Structures and Allocation
- borrow method, Smart Pointer Types
- Borrow trait, More Pointer Traits, Summary
- BorrowMut trait, More Pointer Traits, Summary
- Bos, Mara, Item 16: Avoid writing unsafe code, Conditional Compilation
- bounds checking, Iterator Consumers
- bounds method, Generics
- Box type, Rust References, Trait Object Safety, The 'static Lifetime, Item 29: Listen to Clippy
- broken_intra_doc_links crate attribute, Tooling
- BTreeMap type, Writing Code for no_std
- BTreeSet type, Writing Code for no_std
- build scripts
- build.rs, Item 35: Prefer bindgen to manual FFI mappings
- builder pattern, Item 7: Use builders for complex types, Item 7: Use builders for complex types, Default
- builders, Item 7: Use builders for complex types-Item 7: Use builders for complex types
- byteorder crate, Item 16: Avoid writing unsafe code
C
- C, Scope of a Lifetime, Dependencies
- accessing C data from Rust, Accessing C Data from Rust-Accessing C Data from Rust
- C-like enums, Casts
- code defects exposed by fuzzers, Fuzz Testing
- default target for Rust's interoperability, Item 34: Control what crosses FFI boundaries
- for loop, Item 9: Consider using iterator transforms
instead of explicit loops
- invoking C functions from Rust, Invoking C Functions from Rust-Name mangling
- invoking Rust from, Invoking Rust from C-Invoking Rust from C
- line-based preprocessor, Conditional Compilation
- macro argument with side effects, Declarative Macros
- manual allocations, malloc, Fallible Allocation
- old-style pointers, Item 16: Avoid writing unsafe code
- pointers and references, comparison with Rust, Item 15: Understand the borrow checker
- preferring bindgen to FFI mappings, Item 35: Prefer bindgen to manual FFI mappings-Item 35: Prefer bindgen to manual FFI mappings
- preprocessor macros, Declarative Macros
- printf statement, Declarative Macros
- C++, Who This Book Is For, Fundamental Types, Item 2: Use the type system to express common behavior, Item 10: Familiarize yourself with standard traits, Dependencies, What Not to Document
- == operator, PartialEq and Eq
- allocation failures, caught with exception system, Fallible Allocation
- allocation, hidden, Who’s Afraid of the Big Bad Copy?
- bindgen handling some constructs, Beyond C
- code defects exposed by fuzzers, Fuzz Testing
- code that manually locks and unlocks a mutex, Item 11: Implement the Drop trait for RAII patterns
- combination of enum with union, enums with Fields
- copy-constructors, Copy
- cxx crate for interoperating with Rust, Beyond C
- data races in, Data races in C++-Data races in C++
- exception safety for template code, Item 18: Don’t panic
- exception system, Item 18: Don’t panic
- exceptions and templates, Item 34: Control what crosses FFI boundaries
- explicit constraints on template types, Trait bounds
- for statement, loop declaration in, Item 9: Consider using iterator transforms
instead of explicit loops
- interoperating with Rust code, Item 16: Avoid writing unsafe code
- iostream, operator<< overload, Debug and Display
- line-based preprocessor, Conditional Compilation
- macros, Item 28: Use macros judiciously
- object destruction, Scope of a Lifetime
- one definition rule for C/C++ code accessed via Rust's FFI, Item 25: Manage your dependency graph
- operator overloads, avoiding for unrelated types, Operator Overloads
- overridden definitions with same name, Name mangling
- pointers and references, comparison with Rust, Item 15: Understand the borrow checker
- RAII patterns in, Item 11: Implement the Drop trait for RAII patterns
- RAII patterns used for memory management, Item 11: Implement the Drop trait for RAII patterns
- run-time type identification (RTTI), Item 19: Avoid reflection
- shared_pointer, Smart Pointer Types
- switch arms for enums, warning about missing, enums
- templates, Generics
- unique_ptr, Rust References
- virtual functions, Trait objects
- visibility guidelines, Visibility Semantics
- weak_ptr, Smart Pointer Types
- c++filt, Name mangling, Invoking Rust from C
- C-unwind ABI, Invoking Rust from C
- cackle maniacally, Evolution of Lifetimes
- Cargill, Tom, Item 18: Don’t panic
- Cargo, Dependencies, Version Specification, Things to Remember, Item 31: Take advantage of the tooling ecosystem
- additional tools in, Item 31: Take advantage of the tooling ecosystem
- allowing multiple versions of a crate in a build, Item 25: Manage your dependency graph
- automatic dependency selection by semver, Item 21: Understand what semantic versioning promises
- dependency resolution process, Item 21: Understand what semantic versioning promises
- feature activation, Features
- restrictions in multiple-version support, Item 25: Manage your dependency graph
- searching for tools, Item 31: Take advantage of the tooling ecosystem
- supporting different versions of library crate linked into single binary, Item 24: Re-export dependencies whose types
appear in your API
- tests included in published crate, Testing Advice
- version selection algorithm, Item 25: Manage your dependency graph
- cargo bench, Benchmarks, Things to Remember, Item 31: Take advantage of the tooling ecosystem
- cargo check, Item 31: Take advantage of the tooling ecosystem
- cargo clippy, Item 31: Take advantage of the tooling ecosystem
- cargo doc, Tooling, Additional Documentation Locations, Item 31: Take advantage of the tooling ecosystem
- cargo fmt, Item 31: Take advantage of the tooling ecosystem
- cargo metadata, Item 31: Take advantage of the tooling ecosystem
- cargo test, Item 27: Document public interfaces, Doc Tests, Things to Remember
- cargo tree, Solving Problems with Tooling, Solving Problems with Tooling, Things to Remember, Item 31: Take advantage of the tooling ecosystem
- cargo update, Semver for Crate Users, Version Specification, Item 31: Take advantage of the tooling ecosystem
- cargo-deny, Semver for Crate Authors, Solving Problems with Tooling, Things to Remember, Item 31: Take advantage of the tooling ecosystem
- cargo-expand, Declarative Macros, Disadvantages of Macros, Item 31: Take advantage of the tooling ecosystem, Tools to Remember
- cargo-fuzz, Things to Remember, Tools to Remember
- cargo-semver-checks, Semver for Crate Authors
- cargo-server-checks, Tools to Remember
- cargo-tarpaulin, Item 31: Take advantage of the tooling ecosystem
- cargo-udeps, Solving Problems with Tooling, Things to Remember, Item 31: Take advantage of the tooling ecosystem
- Cargo.lock file, Item 25: Manage your dependency graph, Things to Remember
- Cargo.toml file, Item 25: Manage your dependency graph, Solving Problems with Tooling, Features, Features
- cargo:rustc-link-lib, Linking logistics
- cargo:rustc-link-search, Linking logistics
- casts, Fundamental Types, Casts, Item 29: Listen to Clippy
- catch_unwind, Item 18: Don’t panic
- Cell type, Smart Pointer Types, Smart pointers
- cfg attribute, Conditional Compilation
- cfg(test) attribute, Unit Tests
- cfg_attr attribute, Conditional Compilation
- channels (Go), Advice
- char * (C string), Accessing C Data from Rust
- char type, Fundamental Types
- Clang, Data races in C++
- Clippit, Item 29: Listen to Clippy
- Clippy, Casts, Copy, Item 16: Avoid writing unsafe code, Item 29: Listen to Clippy-Item 29: Listen to Clippy, Tools to Remember
- Clone trait, Item 7: Use builders for complex types, More Pointer Traits, Iterator Transforms, Item 13: Use default implementations
to minimize required trait methods
- clone-on-write, More Pointer Traits, Smart pointers, Item 16: Avoid writing unsafe code
- cloned method, Iterator Transforms, Item 13: Use default implementations
to minimize required trait methods
- cloning data in data structures, Data structure design
- closures, Item 2: Use the type system to express common behavior, Closures
- code bloat with macro use, Disadvantages of Macros
- code reuse, Dependencies
- code, distinguishing from text, Item 27: Document public interfaces
- collect method, Iterator Consumers, When Explicit Is Better
- collections
- comments, documentation, Item 27: Document public interfaces
- comparison traits, PartialOrd and Ord
- compiler messages on errors, Fundamental Types
- Comprehensive Rust online course, Afterword
- concepts in writing Rust code, Concepts
- concision, Item 29: Listen to Clippy
- concrete methods, Item 13: Use default implementations
to minimize required trait methods
- concurrency, Item 17: Be wary of shared-state parallelism
- (see also shared-state parallelism)
- conditional compilation, Item 26: Be wary of feature creep
- conditionals, Declarative Macros
- config options, name/value variants of, Conditional Compilation
- config-specific code, Testing Advice
- const, The 'static Lifetime
- const (pointers), Lifetimes
- const char* (C string), Accessing C Data from Rust
- constants, Visibility Syntax
- constructors, Item 11: Implement the Drop trait for RAII patterns
- consuming iterators, Iterator Traits
- continuous integration, Solving Problems with Tooling, What to Depend On, Tooling, Item 29: Listen to Clippy
- control flow, Declarative Macros
- avoiding nonlocal operations in macros, Advice
- copied method, Iterator Transforms
- copies, reducing, Who’s Afraid of the Big Bad Copy?
- copy semantics, Copy, Who’s Afraid of the Big Bad Copy?
- Copy trait, Smart Pointer Types, Iterator Traits, Iterator Transforms, Who’s Afraid of the Big Bad Copy?
- deciding whether to implement it, Copy
- defined, Copy
- core library, The Error Trait, Item 16: Avoid writing unsafe code, core
- corpus for fuzzing, Fuzz Testing
- Cow enum, More Pointer Traits, Smart pointers, Item 16: Avoid writing unsafe code
- CPAN (Comprehensive Perl Archive Network), Dependencies
- crates, Item 25: Manage your dependency graph
- caution with use of another crate's types in your API, Item 24: Re-export dependencies whose types
appear in your API
- crate names and feature names sharing namespace, Features
- external, using instead of macros, Advice
- multiple versions in dependency graph, Item 29: Listen to Clippy
- no_std compatibility, Item 33: Consider making library code
no_std compatible, Writing Code for no_std
- proc-macro crate type, Procedural Macros
- pub(crate) visibility, Visibility Syntax
- semantic versioning for authors, Semver for Crate Authors
- semantic versioning for users, Semver for Crate Users
- testing advice for, Testing Advice
- tool emitting information on, Item 31: Take advantage of the tooling ecosystem
- vulnerability to dependency problems, What to Depend On
- crates.io, Smart pointers, Self-referential data structures, Semver for Crate Authors, Semver for Crate Users, Item 24: Re-export dependencies whose types
appear in your API, Item 25: Manage your dependency graph, Features
- criterion crate, Benchmarks, Tools to Remember
- cross-compilation, Beyond Standard Rust, Writing Code for no_std
- cross-reference identifiers, Item 27: Document public interfaces
- cross-references (in documentation), Item 27: Document public interfaces
- CRUD, Access Control
- CStr type, Accessing C Data from Rust
- CString type, Accessing C Data from Rust
- Curl tool, Fallible Allocation
- cxx crate, Item 16: Avoid writing unsafe code, Beyond C
D
- data races, Borrow Rules, Data Races-Deadlocks, Lifetimes
- data structures, Types
- deadlocks, Item 17: Be wary of shared-state parallelism, Deadlocks-Advice
- reducing chance of in shared-state parallelism, Advice
- Debug trait, The Error Trait, Nested Errors, Declarative Macros
- DebugDraw trait, Basic Comparisons
- declarative macros, Declarative Macros-Procedural Macros, Advice
- default features, Semver for Crate Authors, Features, Features
- default implementations, Item 13: Use default implementations
to minimize required trait methods
- Default trait, Item 7: Use builders for complex types
- defer statement (Go), Item 11: Implement the Drop trait for RAII patterns
- denial-of-service (DoS) attacks, Fuzz Testing
- Dependabot, Semver for Crate Users, Item 25: Manage your dependency graph, Tools to Remember
- dependencies, Item 31: Take advantage of the tooling ecosystem, Writing Code for no_std
- deciding when to take on, What to Depend On
- defined, Dependencies
- dependencies section of Cargo.toml, Features
- indirect, Item 25: Manage your dependency graph
- nonbreaking change causing compilation failure, Item 23: Avoid wildcard imports
- re-exporting dependencies whose types appear in your API, Item 24: Re-export dependencies whose types
appear in your API-Item 24: Re-export dependencies whose types
appear in your API
- selection by cargo by semantic versioning, Item 21: Understand what semantic versioning promises
- testing functionality of, Unit Tests
- wildcard-imported, pinning to precise version, Item 23: Avoid wildcard imports
- dependency graph, Item 24: Re-export dependencies whose types
appear in your API, Item 25: Manage your dependency graph-Things to Remember, Item 31: Take advantage of the tooling ecosystem
- dependency upgrades, Item 25: Manage your dependency graph
- deprecated attribute, Semver for Crate Authors
- Deref trait, Coercion, Pointer Traits, Standard Traits Covered Elsewhere, Summary
- DerefMut trait, Coercion, Pointer Traits, Standard Traits Covered Elsewhere, Summary, Data races in Rust
- derive attribute, Newtype Limitations, Item 7: Use builders for complex types, Common Standard Traits, Default, PartialEq and Eq, Standard Traits Covered Elsewhere
- derive macros, Item 10: Familiarize yourself with standard traits, Item 19: Avoid reflection, Item 28: Use macros judiciously, Derive macros-Derive macros
- declaring associated helper attributes, Derive macros
- preferring to procedural macro that emits a type, Advice
- DeriveInput data structure, Derive macros
- derive_builder crate, Item 7: Use builders for complex types
- Deserialize macro, Derive macros
- destructors, Item 11: Implement the Drop trait for RAII patterns, The 'static Lifetime
- development environment, tools for, Item 31: Take advantage of the tooling ecosystem
- diagnostic information from macros, When to Use Macros
- discussion forums, Afterword
- Display trait, The Error Trait, Nested Errors, Debug and Display, Declarative Macros
- Div trait, Summary
- DivAssign trait, Summary
- dividing by zero, Item 18: Don’t panic
- dlopen function, Item 19: Avoid reflection
- doc tests, Doc Tests, Things to Remember
- docs.rs, Published Crate Documentation
- documentation
- domain-specific language (DSL), When to Use Macros
- DoubleEndedIterator, Summary
- downcast_mut method, Item 19: Avoid reflection
- downcast_ref method, Item 19: Avoid reflection
- Draw trait, Generics, More Trait Bounds, Item 19: Avoid reflection
- drop method, Item 11: Implement the Drop trait for RAII patterns
- Drop trait, Standard Traits Covered Elsewhere, Summary, Lifetimes
- dropping items, Scope of a Lifetime, Access Control, Owner Operations
- dynamically typed languages, Item 19: Avoid reflection
- dynamic_cast (C++), Item 19: Avoid reflection
E
- Effective C++ (Meyers), Who This Book Is For, Visibility Semantics
- Effective Java (Bloch), Item 19: Avoid reflection, Visibility Semantics, Item 27: Document public interfaces
- efficiency (optimal), fine-tuning for, Who’s Afraid of the Big Bad Copy?
- elision rules (see lifetime elision rules)
- embedded platforms, Item 33: Consider making library code
no_std compatible
- enumerate method, Iterator Transforms
- enums, Types, enums-enums with Fields, Functions and Methods, Smart pointers, Semver for Crate Authors, Derive macros, Advice
- avoiding code repetition with macros, When to Use Macros, When to Use Macros
- C-like, casts between, Casts
- Default trait derived for, Default
- derive macro use, Derive macros
- deriving Copy, Who’s Afraid of the Big Bad Copy?
- disadvantage of macros for, Disadvantages of Macros
- enum types, Item 1: Use the type system to express
your data structures, Ubiquitous enum Types
- field comparisons with Ord and PartialOrd, PartialOrd and Ord
- holding values not in list of allowed variants, Unit Tests
- making public, Visibility Syntax
- nested error types in, Nested Errors
- eprintln! macro, Declarative Macros
- Eq trait, Item 10: Familiarize yourself with standard traits, Hash
- equality (==) checks, PartialEq and Eq
- Err variant of Result, Item 3: Prefer Option and Result transforms
over explicit match expressions, Iterator Transforms
- error conditions, What Not to Document
- error messages
- Error trait, Item 3: Prefer Option and Result transforms
over explicit match expressions, The Error Trait, Standard Traits Covered Elsewhere, Summary, core
- errors, Item 3: Prefer Option and Result transforms
over explicit match expressions, Item 29: Listen to Clippy
- ExactSizeIterator, Summary, Item 13: Use default implementations
to minimize required trait methods
- example code, Item 27: Document public interfaces, Additional Documentation Locations
- exception safety, Item 18: Don’t panic
- exceptions, panic! and, Item 18: Don’t panic
- expect method, Item 3: Prefer Option and Result transforms
over explicit match expressions, Item 18: Don’t panic, Item 29: Listen to Clippy, Unit Tests
- expect_err method, Item 18: Don’t panic
- explicit casts, Casts
- explicit constraints on target type, Trait bounds
- extern C, Invoking C Functions from Rust, Name mangling, Invoking Rust from C
- extern crate, alloc
- extern crate alloc, alloc
F
- f32 type, Fundamental Types, PartialEq and Eq
- f64 type, Fundamental Types
- failures
- fallible allocation, Fallible Allocation
- fat pointers, Coercion, Fat Pointer Types, Trait Objects, Item 19: Avoid reflection, Item 19: Avoid reflection, Item 29: Listen to Clippy
- @FearlessSon, Item 30: Write more than unit tests
- feature option, Features
- feature unification, Item 25: Manage your dependency graph, Features
- features, Item 25: Manage your dependency graph, Item 26: Be wary of feature creep-Things to Remember, Item 29: Listen to Clippy
- FFI (foreign-function interface), Item 16: Avoid writing unsafe code, Item 25: Manage your dependency graph, Tools to Remember, Item 34: Control what crosses FFI boundaries-Things to Remember
- accessing C data from Rust, Accessing C Data from Rust-Accessing C Data from Rust
- encapsulating access to unsafe library in safe Rust code, Lifetimes
- invoking C functions from Rust, Invoking C Functions from Rust
- invoking Rust from C, Invoking Rust from C-Invoking Rust from C
- lifetimes, Lifetimes
- linking with code from languages other than Rust, Beyond Standard Rust
- panic propagation interacting badly with FFI bounds, Item 18: Don’t panic
- preferring bindgen to FFI mappings, Item 35: Prefer bindgen to manual FFI mappings-Item 35: Prefer bindgen to manual FFI mappings
- using existing library via, cost-benefit analysis, Lifetimes
- file descriptors, Item 11: Implement the Drop trait for RAII patterns
- file! MACRO, When to Use Macros
- filter method, Iterator Transforms, Loop Transformation
- find method, Iterator Consumers
- firmware, Item 33: Consider making library code
no_std compatible
- flatten method, Iterator Transforms
- flattening stream of Option / Result values, Iterator Transforms
- floating point types, Fundamental Types
- fmt method, Anonymous Lifetimes
- fn (function pointer) types, Function Pointers, Closures
- Fn trait, Closures, Standard Traits Covered Elsewhere, Summary
- FnMut trait, Closures, Standard Traits Covered Elsewhere, Summary
- FnOnce trait, Closures, Standard Traits Covered Elsewhere, Summary
- fold method, Iterator Consumers, Iterator Consumers
- for loops, Item 9: Consider using iterator transforms
instead of explicit loops, Iterator Traits, Iterator Consumers
- for-each loops, Item 9: Consider using iterator transforms
instead of explicit loops, Iterator Consumers, Loop Transformation
- foreign function interface (see FFI)
- formal verification, Item 31: Take advantage of the tooling ecosystem
- format! macro, Declarative Macros
- format_args! macro, Declarative Macros, Declarative Macros
- for_each method, Iterator Consumers, Iterator Consumers
- free function (in C), Lifetimes
- From trait, Item 3: Prefer Option and Result transforms
over explicit match expressions, Minimal Errors, Standard Traits Covered Elsewhere, Summary
- FromIterator trait, Iterator Consumers
- function pointers, Item 2: Use the type system to express common behavior, Function Pointers
- function signatures, lifetimes, Algebra of Lifetimes
- function-like macros, Function-like macros
- functions, Functions and Methods, Item 28: Use macros judiciously, When to Use Macros
- fuzz tests, Fuzz Testing, Things to Remember
G
- generics, Traits, Item 12: Understand the trade-offs between
generics and trait objects-Trade-Offs, Item 28: Use macros judiciously, When to Use Macros
- Git, tracking commits, Semver for Crate Authors
- Gjengset, Jon, Self-referential data structures, Afterword
- glob imports, Item 23: Avoid wildcard imports
- (see also wildcard imports)
- Go, Rust Version, Fundamental Types, Item 2: Use the type system to express common behavior, Item 11: Implement the Drop trait for RAII patterns, Advice, Item 19: Avoid reflection, Item 34: Control what crosses FFI boundaries
- Godbolt compiler explorer, When Explicit Is Better, Benchmarks, Tools to Remember
- Goldilocks version specification (dependencies), Version Specification
- Google OSS-Fuzz program, Fuzz Testing
- Graham, Paul, Item 28: Use macros judiciously
- gratuitous use of Latin, Item 16: Avoid writing unsafe code
- Group enum, Disadvantages of Macros
H
- Hash trait, Iterator Traits, PartialEq and Eq
- HashMap type, Iterator Traits, PartialEq and Eq, Hash, alloc
- HashSet type, Iterator Consumers, Hash, alloc
- heap, Rust References, Slices, Item 29: Listen to Clippy, Beyond Standard Rust
- Here Be Dragons, Item 16: Avoid writing unsafe code, Lifetimes
- hygienic macros, Item 28: Use macros judiciously, Declarative Macros
- Hyrum's Law, Semver for Crate Authors, Semver for Crate Users, Discussion
I
- i128 type, Fundamental Types
- i16 type, Fundamental Types
- i32 type, Fundamental Types
- i64 type, Fundamental Types, Building Collections from Result Values
- i8 type, Fundamental Types
- IDE or IDE/editor plug-in, Item 31: Take advantage of the tooling ecosystem
- idioms, warning about, Item 29: Listen to Clippy
- immutable references, Borrow Rules
- impl Trait, Generics
- Index trait, Slices, Summary
- IndexMut trait, Slices, Summary
- infallible allocation, Fallible Allocation
- Infallible error type, User-Defined Type Conversions
- inherent implementation, Item 13: Use default implementations
to minimize required trait methods
- inheritance, trait bounds versus, More Trait Bounds
- inline functions, Item 3: Prefer Option and Result transforms
over explicit match expressions
- int type (in C), Code concerns
- integer types
- integration tests, Additional Documentation Locations, Integration Tests, Things to Remember
- interfaces, Item 2: Use the type system to express common behavior
- interior mutability, Smart Pointer Types, The 'static Lifetime, Data races in Rust, Standard marker traits
- internationalization, Debug and Display
- Into trait, User-Defined Type Conversions, Summary, Item 29: Listen to Clippy
- IntoIterator trait, Iterator Traits, Summary
- invariants, What Not to Document, Unit Tests
- is method, Item 19: Avoid reflection
- isize, Smart Pointer Types
- is_empty method, Item 13: Use default implementations
to minimize required trait methods
- Item type, Iterator Traits, Iterator Transforms
- iter method, Iterator Traits
- iterables, Iterator Traits
- iterator adaptors (see iterator transforms)
- Iterator trait, Iterator Traits, Iterator Transforms, Standard Traits Covered Elsewhere, Summary, Item 13: Use default implementations
to minimize required trait methods, core
- iterator transforms, Item 9: Consider using iterator transforms
instead of explicit loops, Iterator Traits-Iterator Transforms
- iterators, Item 9: Consider using iterator transforms
instead of explicit loops-When Explicit Is Better
- iter_mut method, Iterator Traits
L
- lambda expressions, Closures
- lattice, PartialOrd and Ord
- let keyword, Item 7: Use builders for complex types
- lib.rs, Afterword
- libFuzzer, Fuzz Testing
- libraries
- licenses, What to Depend On
- lifetime bound, Item 19: Avoid reflection
- lifetime checks, Rust References, Concepts
- lifetime elision rules, Algebra of Lifetimes, Lifetimes in Data Structures
- lifetime of a value, correlation with lifecycle of a resource, Item 11: Implement the Drop trait for RAII patterns
- lifetime parameter, Lifetimes in Data Structures
- lifetimes, Rust References, Item 14: Understand lifetimes, Data Structures and Allocation, Lifetimes, Invoking Rust from C
- algebra of, Algebra of Lifetimes-Lifetime Elision Rules
- anonymous, Anonymous Lifetimes
- in data structures, Lifetimes in Data Structures
- evolution of, Evolution of Lifetimes-Evolution of Lifetimes
- issue with in multithreaded environment, Data races in Rust
- of items on the heap, Lifetimes and the Heap
- lifetime extension, Local code refactoring
- lifetime reduction, Local code refactoring
- lifetimes of multiple arguments, Lifetimes in Data Structures
- references, Item 15: Understand the borrow checker, Borrow Rules, Things to Remember
- scope of, Scope of a Lifetime-Algebra of Lifetimes
- static lifetime, The 'static Lifetime
- line! macro, When to Use Macros
- link attribute, Linking logistics
- linker, Bypassing the Orphan Rule for Traits, Basic Comparisons, Name mangling
- links key, Linking logistics
- lint, Item 29: Listen to Clippy
- Linux kernel, Fallible Allocation
- Liskov substitution, More Trait Bounds, Upcasting in Future Versions of Rust
- Lisp, Item 2: Use the type system to express common behavior, Procedural Macros
- local code refactoring, Local code refactoring
- localization, Debug and Display
- lock inversion, Deadlocks
- lock method, Item 11: Implement the Drop trait for RAII patterns
- locking hierarchy, Advice
- locks, Deadlocks, Advice
- lock_guard (C++), Data races in C++
- log crate, Declarative Macros
- loops, Declarative Macros
- lossy conversions, Casts
- LowerHex trait, Declarative Macros
M
- macros, Item 7: Use builders for complex types, Item 19: Avoid reflection, Item 28: Use macros judiciously-Advice, Item 31: Take advantage of the tooling ecosystem
- main function, Item 18: Don’t panic, Examples
- major version, Semver Essentials
- map method, Iterator Transforms, Loop Transformation
- maps, core
- Markdown, Item 27: Document public interfaces
- marker traits, Traits, Copy
- match expressions, Item 3: Prefer Option and Result transforms
over explicit match expressions, When to Use Macros
- max method, Iterator Consumers
- max_by method, Iterator Consumers
- memory
- memory leaks, The 'static Lifetime
- memory management, RAII patterns used for, Item 11: Implement the Drop trait for RAII patterns
- memory pointers, Item 11: Implement the Drop trait for RAII patterns
- memory synchronization, Item 11: Implement the Drop trait for RAII patterns
- metadata, Item 31: Take advantage of the tooling ecosystem
- metaprogramming, Item 28: Use macros judiciously
- methods, Item 2: Use the type system to express common behavior, Functions and Methods
- Meyers, Scott, Who This Book Is For, Visibility Semantics, What Not to Document
- Microsoft Clippit, Item 29: Listen to Clippy
- min method, Iterator Consumers
- minimum supported Rust version (MSRV), Semver for Crate Authors
- minor version, Semver Essentials
- min_by method, Iterator Consumers
- Miri, Tools to Remember
- mismatched types error, Fundamental Types
- missing copy implementations compiler lint, Copy
- missing Debug implementations compiler lint, Debug and Display
- missing safety doc Clippy lint, Item 16: Avoid writing unsafe code
- modules, Visibility Syntax
- monomorphization (generics), Trait bounds, Generics
- different monomorphized function for each type called with, Generics
- More Effective C++ (Meyers), What Not to Document
- move keyword, Closures
- moving an item, Access Control, Owner Operations
- Mul trait, Summary
- MulAssign trait, Summary
- multithreading, Data races in C++, Data races in Rust
- general advice on multithreaded code, Advice
- mutable references, Rust References, Pointer Traits, Item 15: Understand the borrow checker
- mutex (in C++), Data races in C++
- Mutex type, Smart Pointer Types, Clone, Item 11: Implement the Drop trait for RAII patterns, Item 11: Implement the Drop trait for RAII patterns, Smart pointers, Item 16: Avoid writing unsafe code, Data races in Rust, alloc, Lifetimes
- MutexGuard type, Smart Pointer Types, Clone, Item 11: Implement the Drop trait for RAII patterns, Data races in Rust, Advice
N
- name clashes, Item 23: Avoid wildcard imports
- name mangling, Name mangling, Invoking Rust from C
- named_mut method, Data structure design
- NaN (not a number) values, PartialEq and Eq
- Neg trait, Operator Overloads, Summary
- nested errors, Nested Errors
- newtype pattern, Item 6: Embrace the newtype pattern-Newtype Limitations
- next method, Item 13: Use default implementations
to minimize required trait methods
- nm tool, Name mangling
- --no-default-features flag (build command), Features
- non-lexical lifetimes, Scope of a Lifetime, Borrow Rules, Owner Operations, Local code refactoring, Things to Remember
- None variant of Option, Item 3: Prefer Option and Result transforms
over explicit match expressions, Item 7: Use builders for complex types, Iterator Transforms
- nonstandard Rust environments, Beyond Standard Rust
- non_exhaustive attribute, Semver for Crate Authors
- Not trait, Summary
- no_deadlocks crate, Advice
- no_global_oom_handling config flag, Fallible Allocation
- no_mangle attribute, Invoking C Functions from Rust
- no_panic crate, Item 18: Don’t panic
- no_std attribute, The Error Trait, Item 16: Avoid writing unsafe code, Who’s Afraid of the Big Bad Copy?, What to Depend On, Features, Item 33: Consider making library code
no_std compatible
- nth element of iterator, Iterator Consumers
O
- object safety, Trait objects, Trait Object Safety, Semver for Crate Authors
- object-oriented programming
- Ok variant of Result, Iterator Transforms
- once_cell crate, Item 16: Avoid writing unsafe code
- one definition rule, Item 25: Manage your dependency graph
- open source, Dependencies
- operating systems
- operator overloads, Operator Overloads
- optimization, Borrow Rules
- Option type, Fundamental Types, Option<T>, Iterator Transforms, core
- Option::None variant, Item 3: Prefer Option and Result transforms
over explicit match expressions
- Ord trait, Iterator Consumers
- orphan rule, Minimal Errors, Nested Errors, Item 7: Use builders for complex types
- OSS-Fuzz program, Fuzz Testing
- owner links in tree-like data structures, Smart pointers
- owner of Rust items
- ownership, Smart Pointer Types
P
- package manager for Rust (see Cargo)
- panic! macro
- panics, Smart Pointer Types, Smart pointers, Item 18: Don’t panic-Item 18: Don’t panic, What Not to Document, Fallible Allocation
- parameters (function), limiting, Item 29: Listen to Clippy
- parking_lot::deadlock, Advice
- parse_macro_input! macro, Derive macros
- PartialEq trait
- PartialOrd trait
- partition method, Iterator Consumers
- patch version, Semver Essentials
- performance, Item 29: Listen to Clippy
- Pin type, Self-referential data structures, Item 16: Avoid writing unsafe code
- Pointer trait, More Pointer Traits, Summary
- pointer traits, Pointer Traits, More Pointer Traits, Smart pointers
- pointers, Item 8: Familiarize yourself with reference
and pointer types, Item 15: Understand the borrow checker
- poisoning (locks), Data races in Rust
- polymorphic type, Item 19: Avoid reflection
- position method, Iterator Consumers
- preconditions, What Not to Document, Unit Tests
- prelude, Item 23: Avoid wildcard imports, Item 33: Consider making library code
no_std compatible
- principle of least astonishment, What Not to Document, Declarative Macros
- printf (C), Declarative Macros
- println! macro, Declarative Macros, Declarative Macros
- private, Visibility Syntax
- proc macros (see procedural macros)
- proc-macro crate, Procedural Macros
- proc-macro2 crate, Procedural Macros
- procedural macros, Item 28: Use macros judiciously, Procedural Macros-Derive macros, Advice, Item 31: Take advantage of the tooling ecosystem
- product method, Iterator Consumers
- programming in the future tense, What Not to Document
- Programming Rust (Blandy et al.), Who This Book Is For, Iterator Consumers
- pub, Visibility Syntax, Visibility Syntax
- public fields in structures, avoiding feature-gating, Features
- push method, Fallible Allocation
- Python, Item 19: Avoid reflection
R
- RAII (Resource Acquisition Is Initialization) pattern, Item 11: Implement the Drop trait for RAII patterns-Item 11: Implement the Drop trait for RAII patterns, Data races in Rust, Lifetimes
- wrapper that prevents C memory leaks, Lifetimes
- rand crate, Item 16: Avoid writing unsafe code, Item 24: Re-export dependencies whose types
appear in your API, Features
- random number generation, alloc
- range expression, Slices
- Range type, Slices
- raw identifier prefix (r#), Data Structures and Allocation
- raw memory, Item 11: Implement the Drop trait for RAII patterns
- raw pointers, Item 8: Familiarize yourself with reference
and pointer types, Item 16: Avoid writing unsafe code, Standard marker traits, Lifetimes, Invoking Rust from C
- Rc type, Smart Pointer Types, Smart Pointer Types, Data structure design, Smart pointers, Smart pointers, References and Smart Pointers
- re-export, Item 24: Re-export dependencies whose types
appear in your API-Item 24: Re-export dependencies whose types
appear in your API
- readability, Item 29: Listen to Clippy
- Receiver, Advice
- reduce method, Iterator Consumers
- Ref type, Smart Pointer Types
- RefCell type, Smart Pointer Types, Data structure design, Smart pointers
- reference-counted pointers, Data races in Rust
- references, Closures, Item 3: Prefer Option and Result transforms
over explicit match expressions, Item 8: Familiarize yourself with reference
and pointer types-Fat Pointer Types, Data Structures and Allocation, Lifetimes, Invoking Rust from C
- borrowing, rules for, Borrow Rules
- coercions of reference types, Coercion
- creation and use of, Item 15: Understand the borrow checker
- lifetime scope and, Scope of a Lifetime
- lifetimes of, Scope of a Lifetime, Things to Remember, Item 15: Understand the borrow checker, Lifetimes
- macro expansions that insert, avoiding, Advice
- mutable, Closures
- prevention of references to expired stack objects, Invoking Rust from C
- and smart pointers, References and Smart Pointers
- stored in data structures, lifetimes of, Lifetimes in Data Structures
- reflection, Item 19: Avoid reflection-Upcasting in Future Versions of Rust, Procedural Macros
- reflexive implementation of From, User-Defined Type Conversions
- reflexivity, PartialEq and Eq
- registry of crates, Item 25: Manage your dependency graph
- release method, Item 11: Implement the Drop trait for RAII patterns
- Rem trait, Summary, Summary
- RemAssign trait, Summary
- render method, More Trait Bounds
- replace function, Access Control, Item 16: Avoid writing unsafe code
- repr(C), Accessing C Data from Rust, Invoking Rust from C
- repr(transparent), Item 6: Embrace the newtype pattern
- Resource Acquisition Is Initialization (see RAII pattern)
- Result type, Result<T, E>, Iterator Transforms, When Explicit Is Better, core
- avoiding unwrap calls for, Examples
- building collections from values, Building Collections from Result Values
- error types as second type argument of, Item 4: Prefer idiomatic Error types
- holding MutexGuard, Data races in Rust
- macro emitting, Declarative Macros
- manipulations of, Clippy pointing out redundancies, Item 29: Listen to Clippy
- preferring to Option for expressing errors, Item 3: Prefer Option and Result transforms
over explicit match expressions
- returned by release method, Item 11: Implement the Drop trait for RAII patterns
- returned in type conversions, User-Defined Type Conversions
- returning with proper error type instead of panic!, Item 18: Don’t panic
- values from try_borrow, Smart Pointer Types
- Result::Err variant, Item 3: Prefer Option and Result transforms
over explicit match expressions
- return statements, Declarative Macros
- rewrite it in Rust (RiiR), Item 34: Control what crosses FFI boundaries, Afterword
- RTTI (run-time type identification), Item 19: Avoid reflection
- Rust Atomics and Locks (Bos), Item 16: Avoid writing unsafe code, Conditional Compilation
- Rust for Rustaceans (Gjengset), Self-referential data structures, Afterword
- Rust Fuzz Book, Fuzz Testing
- Rust playground, Item 31: Take advantage of the tooling ecosystem
- The Rust Programming Language (Klabnik and Nichols), Who This Book Is For
- rustc, Rust Version
- RustCrypto crates, Item 24: Re-export dependencies whose types
appear in your API
- rustfilt, Invoking Rust from C
- rustfmt, inapplicability to macro invocations, Disadvantages of Macros
- Rustonomicon, Beyond Standard Rust, Item 34: Control what crosses FFI boundaries
- rustup, Item 31: Take advantage of the tooling ecosystem
- RwLock type, Smart pointers, Item 16: Avoid writing unsafe code, Standard marker traits
S
- safety, Preface
- scan method, Iterator Consumers
- scope, Scope of a Lifetime-Algebra of Lifetimes
- segments (stack), Introduction to the Stack
- self keyword, Functions and Methods, Traits, Lifetime Elision Rules, Data races in Rust
- Self type, Trait objects, Item 7: Use builders for complex types, Item 7: Use builders for complex types, Iterator Traits
- self-referential data structures, Self-referential data structures-Things to Remember, Item 16: Avoid writing unsafe code
- semantic versioning, Item 21: Understand what semantic versioning promises-Discussion
- semi-automatic type conversions, Item 5: Understand type conversions
- Send trait, Standard Traits Covered Elsewhere, Summary, Standard marker traits
- Sender/Receiver pair, Advice
- separate compilation, Name mangling
- serde crate, Bypassing the Orphan Rule for Traits, Derive macros
- sets, core
- Shape trait, Item 19: Avoid reflection
- shapes, rendering in OO example, Trade-Offs
- shared-state parallelism, Smart Pointer Types, Item 11: Implement the Drop trait for RAII patterns, Item 17: Be wary of shared-state parallelism-Advice
- shared_pointer (C++), Smart Pointer Types
- Shl trait, Summary
- ShlAssign trait, Summary
- should_panic attribute, Unit Tests
- Shr trait, Summary
- ShrAssign trait, Summary
- Sized trait, Summary, Trait Object Safety
- skip method, Iterator Transforms
- skip_while method, Iterator Transforms
- sleep, Data races in C++
- SliceIndex type, Slices
- slices, Slices, Item 18: Don’t panic
- smart pointer types, Smart Pointer Types, Lifetimes in Data Structures, Smart pointers-Things to Remember, References and Smart Pointers
- Some variant of Option, Iterator Transforms
- sorting, using marker trait in, Traits
- spin crate, alloc
- Square object, Item 19: Avoid reflection
- square! macro, Declarative Macros
- square_once! macro, Declarative Macros, Disadvantages of Macros
- stack, Rust References, Rust References, Trait objects, Beyond Standard Rust
- stack pointers, Introduction to the Stack
- state inconsistency sequence, Deadlocks
- static library file, Linking logistics
- static lifetime, Algebra of Lifetimes, The 'static Lifetime, Things to Remember
- static typing, Fundamental Types
- static, global variable marked as, Lifetimes and the Heap
- statically typed languages, Rust Version
- std library, The Error Trait, Item 16: Avoid writing unsafe code, Features
- std::any::type_name, Item 19: Avoid reflection
- std::any:tname, Item 19: Avoid reflection
- std::fmt, Declarative Macros
- std::mem functions, Item 16: Avoid writing unsafe code
- std::os::raw::c_int, size of, Code concerns
- String type, Minimal Errors, Pointer Traits, Accessing C Data from Rust
- String::from_utf8, Item 18: Don’t panic
- String::from_utf8_unchecked, Item 18: Don’t panic
- strings, Lifetimes in Data Structures
- struct types, Aggregate Types, Derive macros
- in C and Rust, Accessing C Data from Rust
- contents made public, avoiding making fields feature-dependent, Features
- derive macro use, Derive macros
- encapsulating interaction with C library in wrapper struct, Lifetimes
- field-by-field comparison for Eq, Item 10: Familiarize yourself with standard traits
- methods added to, Functions and Methods
- private fields in, Visibility Semantics
- traits versus, for flexible code, Traits
- using builder pattern with complex structs, Item 7: Use builders for complex types-Item 7: Use builders for complex types
- struct update syntax, Default
- structs, Semver for Crate Authors
- Sub trait, Operator Overloads, Summary
- SubAssign trait, Summary
- subtyping, Coercion
- suggestions for future learning, Afterword
- sum method, Iterator Consumers, Loop Transformation
- supply chain attacks, What to Depend On
- swap function, Item 16: Avoid writing unsafe code
- syn crate, Function-like macros, Derive macros, Item 31: Take advantage of the tooling ecosystem
- Sync trait, Standard Traits Covered Elsewhere, Summary, Summary, Standard marker traits
- synchronization primitives, Data races in Rust, alloc
T
- T (target type) in generics, monomorphization into particular type, Trait bounds
- take function, Item 16: Avoid writing unsafe code
- take method, Loop Transformation
- take_while method, Iterator Transforms
- target_arch config option, Conditional Compilation
- target_endian config option, Conditional Compilation
- target_has_atomic config option, Conditional Compilation
- target_os config option, Conditional Compilation
- target_pointer_width config option, Conditional Compilation
- templates (C++), Generics, Item 18: Don’t panic
- test attribute, Unit Tests
- test modules, Item 23: Avoid wildcard imports, Unit Tests
- tests, Additional Documentation Locations, Item 30: Write more than unit tests-Things to Remember
- text section, Name mangling
- @thingskatedid, Item 1: Use the type system to express
your data structures
- thread safety in Rust, Data races in Rust
- thread-compatible, Data races in C++
- thread-hostile, Data races in C++
- thread-safe, Data races in C++
- threading, Smart Pointer Types, Standard Traits Covered Elsewhere
- threads
- ThreadSanitizer, Advice, Fuzz Testing
- TLV (type-length-value) structure, Data Structures and Allocation-Data Structures and Allocation
- tokens, Derive macros
- TokenTree::Punct tokens, Function-like macros
- Tolnay, David, Trait Objects, Procedural Macros, Function-like macros
- tooling, Disadvantages of Macros
- tooling ecosystem, Item 31: Take advantage of the tooling ecosystem-Tools to Remember
- ToOwned trait, More Pointer Traits, Summary
- trait bounds, Traits, Item 12: Understand the trade-offs between
generics and trait objects, Generics, Item 19: Avoid reflection, Item 28: Use macros judiciously
- trait coherence rules, User-Defined Type Conversions
- trait methods with default implementations, Item 13: Use default implementations
to minimize required trait methods
- trait objects, Traits, Trait objects, Trait objects, Item 12: Understand the trade-offs between
generics and trait objects, Trait Objects, Item 19: Avoid reflection
- traits, Types, Item 2: Use the type system to express common behavior, Item 19: Avoid reflection
- attempting to implement foreign trait for foreign type, Bypassing the Orphan Rule for Traits
- auto-generated implementations from derive macros, Item 10: Familiarize yourself with standard traits
- breaking changes in, Semver for Crate Authors
- bypassing orphan rule for, Bypassing the Orphan Rule for Traits
- coercion of concrete item into trait object, Coercion
- common standard traits, Common Standard Traits-Debug and Display, Summary
- defined, Traits, Traits
- example for displaying graphical objects, Item 12: Understand the trade-offs between
generics and trait objects
- Fn, FnOnce, and FnMut, Closures
- iterator, Iterator Traits
- less common standard traits, Standard Traits Covered Elsewhere, Summary
- making public, Visibility Syntax
- marker, Traits
- new upcasting feature, Upcasting in Future Versions of Rust
- newtype and traits implemented on inner type, Newtype Limitations
- operator overload traits summary, Summary
- pointer, Pointer Traits, More Pointer Traits
- public, with feature gate on a method, Features
- relating to operator overloads, Operator Overloads
- standard traits, Item 10: Familiarize yourself with standard traits
- used to display data in formats, Declarative Macros
- in user-defined type conversions, User-Defined Type Conversions
- using default implementations to minimize required trait methods, Item 13: Use default implementations
to minimize required trait methods
- transformations, Item 9: Consider using iterator transforms
instead of explicit loops
- tree data structures, Data structure design, Smart pointers
- TryFrom trait, Standard Traits Covered Elsewhere, Summary, When to Use Macros
- TryInto trait, User-Defined Type Conversions, Summary
- try_.. methods, When Explicit Is Better
- try_borrow method, Smart Pointer Types
- try_find method, Iterator Consumers
- try_fold method, Iterator Consumers
- try_for_each method, Iterator Consumers
- try_new method, Fallible Allocation
- try_reserve method, Fallible Allocation
- tuple struct, Aggregate Types, Minimal Errors, Item 6: Embrace the newtype pattern
- tuple type, Aggregate Types
- turbofish, Building Collections from Result Values
- type aliases, Minimal Errors, Item 6: Embrace the newtype pattern
- type coercion, Function Pointers, Coercion, Pointer Traits, Item 19: Avoid reflection
- type conversions, Item 5: Understand type conversions-Coercion
- type erasure, Trade-Offs
- type safety, Preface, Name mangling
- type system, Preface
- encoding behavior into, Types
- not documenting things already expressed by, Unit Tests
- type-length-value (TLV) structure, Data Structures and Allocation-Data Structures and Allocation
- TypeId, Item 19: Avoid reflection
- typeid (C++), Item 19: Avoid reflection
- types, Item 1: Use the type system to express
your data structures-Result<T, E>
- aggregate, Aggregate Types
- closures, Closures
- core and std, core
- defined, Types
- expressing common behaviors, Item 2: Use the type system to express common behavior
- full type names required when not using std, Writing Code for no_std
- function pointers, Function Pointers
- functions, Functions and Methods
- fundamental, Fundamental Types-Aggregate Types
- idiomatic Error types, preferring, Item 4: Prefer idiomatic Error types-Things to Remember
- including as much semantics as possible Rust type system, What Not to Document
- making common types available without using full names, Item 33: Consider making library code
no_std compatible
- methods, Functions and Methods
- newtype pattern, Item 6: Embrace the newtype pattern-Newtype Limitations
- preferring Option and Result transforms over explicit match expressions, Item 3: Prefer Option and Result transforms
over explicit match expressions-Things to Remember, Item 3: Prefer Option and Result transforms
over explicit match expressions
- sized types at FFI boundaries, Code concerns
- traits, Traits
- using builders for complex types, Item 7: Use builders for complex types-Item 7: Use builders for complex types
- visibility, Visibility Syntax
U
- u128 type, Fundamental Types
- u16 type, Fundamental Types
- u32 type, Fundamental Types, Fundamental Types
- u64 type, Fundamental Types
- u8 type, Fundamental Types, Building Collections from Result Values
- Unicode, Fundamental Types
- union, Item 25: Manage your dependency graph, Features, Derive macros
- unique_ptr (C++), Item 11: Implement the Drop trait for RAII patterns
- unit tests, Unit Tests-Unit Tests, Things to Remember
- unit type, Fundamental Types
- unreachable! macro, Item 18: Don’t panic
- unsafe code, Item 11: Implement the Drop trait for RAII patterns, Concepts, Fuzz Testing
- unsafe functions, Fundamental Types
- unsafe keyword, Item 16: Avoid writing unsafe code
- unsafe mode, Beyond Standard Rust
- unsafe_op_in_unsafe_fn lint, Item 16: Avoid writing unsafe code
- unstable features in Rust, Benchmarks
- unwrap method, Item 3: Prefer Option and Result transforms
over explicit match expressions, Item 18: Don’t panic, Unit Tests, Examples
- unwrap_err method, Item 18: Don’t panic
- unzip method, Iterator Consumers
- upcasting in future Rust versions, Upcasting in Future Versions of Rust
- usability, Who’s Afraid of the Big Bad Copy?
- use statements, Item 23: Avoid wildcard imports, Item 23: Avoid wildcard imports, Item 33: Consider making library code
no_std compatible
- core types in no_std environments, core
- use-after-free, Lifetimes
- user-defined type conversions, User-Defined Type Conversions
- user-defined types
- usize, Fundamental Types
- UTF-8, Fundamental Types, Nested Errors
V
- Vec type, Slices, Smart Pointer Types, Iterator Consumers, Fallible Allocation
- vectors, core
- verification (formal), Item 31: Take advantage of the tooling ecosystem
- version control, Cargo.lock file, Item 25: Manage your dependency graph
- version selection algorithm (Cargo), Item 25: Manage your dependency graph
- version specification (dependencies), Version Specification
- visibility, Item 22: Minimize visibility-Visibility Semantics
- void (C), Fundamental Types
- vtable, Coercion, Trait objects, Trait Objects
W
- warn(missing_docs) attribute, Tooling
- warnings about Rust usage (Clippy), Item 29: Listen to Clippy
- Weak type, Smart Pointer Types, Smart pointers
- weak_ptr (C++), Smart Pointer Types
- wildcard dependency, Semver for Crate Users
- wildcard imports, Item 23: Avoid wildcard imports-Item 23: Avoid wildcard imports
- Wilde, Oscar, Dependencies
- Winters, Titus, Tooling
- wrapper layer holding unsafe code, Item 16: Avoid writing unsafe code
- wrapper struct for C library interaction, Lifetimes