Index
Symbols
- ! operator, Unary Operators
- ! type, Why Rust Has loop
- != operator, Equality Tests
- #!, Attributes
- #[cfg] attribute, Attributes, Platform-Specific Features
- #[inline] attribute, Attributes
- #[link] attribute, Using Functions from Libraries
- $ (command prompt), Downloading and Installing Rust
- & operator, Handling Command-Line Arguments, Rust References Versus C++ References
- & pattern, Reference Patterns
- &mut operator, Rust References Versus C++ References
- &mut [T] type, Arrays, Vectors, and Slices
- &str (string slice), Strings in Memory
- &[T] type, Arrays, Vectors, and Slices
- * operator, Handling Command-Line Arguments, Rust References Versus C++ References, Reference Operators, Generic Traits (or How Operator Overloading Works)
- * wildcard, Versions
- *const T, Raw Pointers
- *mut T, Raw Pointers
- + operator, Binary Operators, Appending and Inserting Text
- - operator, Arithmetic, Bitwise, Comparison, and Logical Operators, Unary Operators
- . operator, Rust References Versus C++ References
- /// (documentation comments), What the Mandelbrot Set Actually Is
- <T>, Tuples
- = operator, Assignment
- == operator, Equality Tests
- ? operator, Propagating Errors
- @ patterns, @ patterns
- [T; N] type, Arrays, Vectors, and Slices
- [t] slices, Slices
- | (vertical bar), Matching Multiple Possibilities
A
- aborting, Aborting
- absolute path, Paths and Imports
- adapter methods
- by_ref, by_ref
- chain, chain
- cloned, cloned
- cycle, cycle
- enumerate, enumerate
- filter_map and flat_map adapters, filter_map and flat_map-filter_map and flat_map
- fuse, fuse
- inspect, inspect
- iterators, Iterator Adapters-cycle
- map and filter, map and filter-map and filter
- peekable, peekable
- reversible iterators and rev, Reversible Iterators and rev-Reversible Iterators and rev
- scan adapter, scan
- skip and skip_while, skip and skip_while
- take and take_while, take and take_while
- zip, zip
- ahead-of-time compilation, Basic Types
- alignment, raw pointers, Type Sizes and Alignments
- all method, any and all
- any method, any and all
- Arc pointer type, Rc and Arc: Shared Ownership-Rc and Arc: Shared Ownership
- arguments
- Arguments type, Using the Formatting Language in Your Own Code
- arithmetic operators, Arithmetic, Bitwise, Comparison, and Logical Operators, Arithmetic and Bitwise Operators-Compound Assignment Operators
- arrays
- arrays of arrays, Joining
- as operator, Integer Types, Raw Pointers
- ASCII, ASCII, Latin-1, and Unicode
- Ascii string type
- AsMut trait, AsRef and AsMut
- AsRef trait, AsRef and AsMut
- assert! macro, A Simple Function
- assert_eq! macro, Macros
- assignment
- associated functions, Defining Methods with impl
- associated types, Associated Types (or How Iterators Work)-Associated Types (or How Iterators Work)
- atomic types, Atomics
- attributes, Writing and Running Unit Tests, Attributes-Attributes
B
- backpressure, Channel Features and Performance
- binary input/output, Binary Data, Compression, and Serialization
- binary operators, Arithmetic, Bitwise, Comparison, and Logical Operators, Binary Operators
- binary trees, populating with patterns, Populating a Binary Tree
- BinaryHeap<T> collection type
- bitwise integer operators, Arithmetic, Bitwise, Comparison, and Logical Operators
- bitwise operators
- blocks, Blocks and Semicolons-Blocks and Semicolons
- Boolean type (bool), The bool Type, if and match
- Borrow trait, Borrow and BorrowMut-Borrow and BorrowMut
- borrowing
- BorrowMut trait, Borrow and BorrowMut
- bounds, reverse-engineering, Reverse-Engineering Bounds-Reverse-Engineering Bounds
- Box<T>, Ownership
- boxes, Boxes
- break expressions, Loops
- BTreeMap<K, V> collection type
- BTreeSet<T> collection type, HashSet<T> and BTreeSet<T>-Whole-Set Operations
- buddy traits, Buddy Traits (or How rand::random() Works)-Buddy Traits (or How rand::random() Works)
- buffered readers, Buffered Readers
- BufRead trait, Input and Output
- bugs, unsafe code and, Unsafe Functions
- build script, Using Functions from Libraries
- BuildHasher trait, Using a Custom Hashing Algorithm
- byte literals, Integer Types
- byte strings, Byte Strings
- by_ref adapter, by_ref
C
- C
- C++
- callbacks, closures and, Callbacks-Callbacks
- cancellation, atomics and, Atomics
- capacity of a vector, Growing and Shrinking Vectors
- Cargo, Downloading and Installing Rust
- cargo build, Crates-Crates
- cargo doc, Documentation-Documentation
- cargo package, Publishing Crates to crates.io
- cargo test, Tests and Documentation-Integration Tests
- Cargo.lock, Cargo.lock
- case conversion
- casts, Type Casts
- Cell<T> struct, Interior Mutability
- Cells, Interior Mutability
- chain adapter, chain
- channels, Channels-Beyond Pipelines
- char type, Characters, Characters (char)-Conversions to and from Integers
- character literals, Characters
- characters (char), Characters (char)-Conversions to and from Integers
- child process, Other Reader and Writer Types
- Clone trait, Clone
- cloned adapter, cloned
- closures, Closures, Closures-Using Closures Effectively
- "that kill", Closures That Kill-FnOnce
- borrowing references, Closures That Borrow
- callbacks, Callbacks-Callbacks
- capturing variables, Capturing Variables
- defined, A Concurrent Mandelbrot Program
- dropping values, Closures That Kill-FnOnce
- effective use of, Using Closures Effectively
- FnMut, FnMut-FnMut
- FnOnce, FnOnce-FnOnce
- inspect adapter and, inspect
- layout in memory, Closure Performance
- moves with, Closures That Steal
- performance, Closure Performance
- safety, Closures and Safety-FnMut
- types, Function and Closure Types-Function and Closure Types
- code, unsafe (see unsafe code)
- coherence rule, Traits and Other People’s Types
- collections, Collections-Beyond the Standard Collections
- BinaryHeap<T>, BinaryHeap<T>
- BTreeMap<K, V>, HashMap<K, V> and BTreeMap<K, V>-Map Iteration
- BTreeSet<T>, HashSet<T> and BTreeSet<T>-Whole-Set Operations
- hashing, Hashing-Using a Custom Hashing Algorithm
- HashMap<K, V>, HashMap<K, V> and BTreeMap<K, V>-Map Iteration
- HashSet<T>, HashSet<T> and BTreeSet<T>-Whole-Set Operations
- LinkedList<T>, LinkedList<T>
- strings as generic collections, Strings as Generic Collections
- summary of standard collections, Overview
- Vec<T>, Vec<T>-Rust Rules Out Invalidation Errors
- VecDeque<T>, VecDeque<T>-VecDeque<T>
- command prompt ($), Downloading and Installing Rust
- command-line arguments, Handling Command-Line Arguments-Handling Command-Line Arguments, Parsing Pair Command-Line Arguments-Parsing Pair Command-Line Arguments
- community, Rust, More Nice Things
- comparison operators, Arithmetic, Bitwise, Comparison, and Logical Operators
- compiler, Downloading and Installing Rust
- complex numbers, Mapping from Pixels to Complex Numbers
- compound assignment operators, Compound Assignment Operators-Compound Assignment Operators
- compression, Binary Data, Compression, and Serialization
- concurrency/concurrent programming, Why Rust?, Concurrency-What Hacking Concurrent Code in Rust Is Like
- condition (with if statement), if and match
- conditional variables (Condvar), Condition Variables (Condvar)
- constants, Items, the Building Blocks of Rust
- consuming iterators, Consuming Iterators-partition
- and all methods, any and all
- collect method, Building Collections: collect and FromIterator
- comparing item sequences, Comparing Item Sequences
- count method, Simple Accumulation: count, sum, product
- Extend trait, The Extend Trait
- find method, find
- fold method, fold
- FromIterator trait, Building Collections: collect and FromIterator
- last method, last
- max_by_key and min_by_key methods, max_by_key, min_by_key
- min and max methods, max, min
- nth method, nth
- partition method, partition
- position, rposition, and ExactSizeIterator, position, rposition, and ExactSizeIterator
- product method, Simple Accumulation: count, sum, product
- simple accumulation, Simple Accumulation: count, sum, product
- sum method, Simple Accumulation: count, sum, product
- contracts
- Copy types, Copy Types: The Exception to Moves-Copy Types: The Exception to Moves, Copy
- count method, Simple Accumulation: count, sum, product
- Cow (clone on write) type, Borrow and ToOwned at Work: The Humble Cow, Putting Off Allocation-Putting Off Allocation
- crates, Crates-Build Profiles
- crates.io, Publishing Crates to crates.io
- critical section, What Is a Mutex?
- Cursor, Other Reader and Writer Types
- cycle adapter, cycle
D
- dangling pointer, Ownership
- data races
- deadlock, Deadlock
- Debug trait, Converting Other Types to Strings
- debugging
- declarations, Declarations, Declaring Foreign Functions and Variables-Using Functions from Libraries
- default implementation, Default Methods
- Default trait, Default-Default
- dependencies
- deque, VecDeque<T>
- (see also VecDeque<T> collection type)
- deref coercions, Type Casts
- Deref trait, Deref and DerefMut-Deref and DerefMut
- dereferencing, Handling Command-Line Arguments
- DerefMut trait, Deref and DerefMut-Deref and DerefMut
- digits, handling, Handling Digits
- directionality of text, Text Directionality
- directories
- Display trait, Converting Other Types to Strings
- divergent function, Why Rust Has loop
- doc comments, Documentation
- doc-tests, Doc-Tests-Doc-Tests
- documentation, Downloading and Installing Rust, Documentation-Documentation
- documentation comments, What the Mandelbrot Set Actually Is
- drain method, drain Methods
- drop trait, Drop-Drop
- dropping values
E
- elements, expressions and, Fields and Elements
- empty statements, Blocks and Semicolons
- entries, defined, HashMap<K, V> and BTreeMap<K, V>
- Entry type, Entries-Entries
- enumerate adapter
- enums, Enums and Patterns-Generic Enums, The Big Picture
- equality operators, Equality Tests-Equality Tests
- error handling, Error Handling-Why Results?
- across threads, Error Handling Across Threads
- catching errors, Catching Errors-Catching Errors
- channels and, Sending Values
- declaring a custom error type, Declaring a Custom Error Type
- errors that “can’t happen”, Dealing with Errors That “Can’t Happen”
- ignoring errors, Ignoring Errors
- in main(), Handling Errors in main()
- panic, Panic-Aborting
- printing errors, Printing Errors
- propagating errors, Propagating Errors
- Result type, Result-Why Results?
- Result type aliases, Result Type Aliases
- Result vs. exceptions, Why Results?
- unsafe code and, A Safe Interface to libgit2
- with multiple error types, Working with Multiple Error Types
- ExactSizeIterator trait, position, rposition, and ExactSizeIterator
- exceptions, Result vs., Why Results?
- exclusive (half-open) ranges, Fields and Elements, Matching Multiple Possibilities
- expression language, Rust as, An Expression Language
- expressions, Expressions-Onward
- assignment, Assignment
- blocks and semicolons, Blocks and Semicolons-Blocks and Semicolons
- closures, Closures
- declarations, Declarations
- fields and elements, Fields and Elements
- function/method calls, Function and Method Calls
- if and match, if and match-if let
- if let, if let
- loops, Loops-Loops
- precedence and associativity, Precedence and Associativity-Precedence and Associativity
- reference operators, Reference Operators
- return, return Expressions
- Rust as expression language, An Expression Language
- statements vs., An Expression Language
- syntax, Precedence and Associativity-Precedence and Associativity
- type casts, Type Casts
- Extend trait, The Extend Trait
- extension traits, Traits and Other People’s Types
- extern blocks, Items, the Building Blocks of Rust, Declaring Foreign Functions and Variables-Declaring Foreign Functions and Variables
F
- fat pointer, Slices, References to Slices and Trait Objects
- fields, expressions and, Fields and Elements
- files
- files and directories, Files and Directories-Platform-Specific Features
- filesystem access functions, Filesystem Access Functions
- filter adapter, map and filter-map and filter
- filter_map adapter, filter_map and flat_map-filter_map and flat_map
- find method, find
- flate2 crate, Binary Data, Compression, and Serialization
- flat_map adapter, filter_map and flat_map
- floating-point literals, Floating-Point Types
- floating-point types, Floating-Point Types-Floating-Point Types
- flow-sensitive analyses, Why Rust Has loop
- Flux, Using Closures Effectively
- fmt method, Formatting Your Own Types
- fn keyword, A Simple Function, Declarations
- Fn trait, FnMut
- FnMut trait, FnMut-FnMut
- FnOnce trait, FnOnce-FnOnce
- fold method, fold
- for loop, Loops-Loops
- foreign functions, Foreign Functions: Calling C and C++ from Rust-A Safe Interface to libgit2
- fork-join parallelism, Fork-Join Parallelism-Revisiting the Mandelbrot Set
- format parameters, Formatting Values
- formatting values
- dynamic widths and precisions, Dynamic Widths and Precisions
- for debugging, Formatting Values for Debugging
- implementing traits for, Formatting Your Own Types-Formatting Your Own Types
- numbers, Formatting Numbers-Formatting Numbers
- pointers for debugging, Formatting Pointers for Debugging
- referring to arguments by index or name, Referring to Arguments by Index or Name
- strings and text, Formatting Values-Using the Formatting Language in Your Own Code
- text values, Formatting Text Values
- using formatting language in your own code, Using the Formatting Language in Your Own Code
- various standard library types, Formatting Other Types
- format_args! macro, Using the Formatting Language in Your Own Code
- free functions, Defining Methods with impl
- From trait, From and Into-From and Into
- fully qualified method calls, Fully Qualified Method Calls-Fully Qualified Method Calls
- functions
- fuse adapter, fuse
G
- GapBuffer, Example: GapBuffer-Example: GapBuffer
- garbage collection
- generic code
- generic collections, strings as, Strings as Generic Collections
- generic enums, Generic Enums-Generic Enums
- generic functions, Parsing Pair Command-Line Arguments, Basic Types, Generic Functions-Generic Functions
- generic structs, What the Mandelbrot Set Actually Is, Generic Structs
- generic swaps, Tuples
- generic traits, Generic Traits (or How Operator Overloading Works)
- generics
- global variables, Global Variables
- guards, Pattern Guards
I
- if expressions, if and match-if let
- if let expressions, if let
- image files, for Mandelbrot set, Writing Image Files-Writing Image Files
- immutable references, References
- impl block, Items, the Building Blocks of Rust, Defining Methods with impl-Defining Methods with impl
- imports, Paths and Imports
- Index trait, Index and IndexMut-Index and IndexMut
- indexed content, Moves and Indexed Content-Moves and Indexed Content
- IndexMut trait, Index and IndexMut-Index and IndexMut
- infinite loops, Loops
- inlining, Closure Performance
- input and output, Input and Output-Networking
- inspect adapter, inspect
- installation, Rust, Downloading and Installing Rust-Downloading and Installing Rust
- integer literals, Integer Types, Literals, Variables, and Wildcards in Patterns
- integer types, Integer Types-Integer Types
- integers, converting characters to/from, Conversions to and from Integers
- integration tests, Integration Tests
- interior mutability
- Into trait, From and Into-From and Into
- IntoIterator trait, The Iterator and IntoIterator Traits-The Iterator and IntoIterator Traits
- invalidation errors, Rust Rules Out Invalidation Errors
- invariants, What Is a Mutex?
- inverted index, Sending Values-Sending Values
- irrefutable patterns, Where Patterns Are Allowed
- isize type, Integer Types
- item declarations, Declarations
- items, Items, the Building Blocks of Rust-Items, the Building Blocks of Rust
- iter method, iter and iter_mut Methods
- iterable type, The Iterator and IntoIterator Traits
- iterating
- Iterator trait
- iterators, Iterators-Implementing Your Own Iterators
- adapter methods, Iterator Adapters-cycle
- and associated types, Associated Types (or How Iterators Work)-Associated Types (or How Iterators Work)
- by_ref adapter, by_ref
- chain adapter, chain
- cloned adapter, cloned
- consuming, Consuming Iterators-partition
- creating, Creating Iterators-Other Iterator Sources
- cycle adapter, cycle
- defined, Handling Command-Line Arguments
- drain methods, drain Methods
- enumerate adapter, enumerate
- filter_map and flat_map adapters, filter_map and flat_map-filter_map and flat_map
- fuse adapter, fuse
- implementing for your own types, Implementing Your Own Iterators-Implementing Your Own Iterators
- in standard library, Other Iterator Sources
- inspect adapter, inspect
- IntoIterator implementations, IntoIterator Implementations-IntoIterator Implementations
- iter and iter_mut methods, iter and iter_mut Methods
- map and filter methods, map and filter-map and filter
- peekable, peekable
- reversible, Reversible Iterators and rev-Reversible Iterators and rev
- scan adapter, scan
- skip and skip_while adapters, skip and skip_while
- take and take_while adapters, take and take_while
- traits, The Iterator and IntoIterator Traits-The Iterator and IntoIterator Traits
- zip adapter, zip
- iter_mut method, iter and iter_mut Methods
L
- last method, last
- Latin-1 character set, ASCII, Latin-1, and Unicode
- lazy_static crate, Building Regex Values Lazily
- let declarations, Declarations
- Li, Peng, Type Safety
- libgit2, Foreign Functions: Calling C and C++ from Rust-A Safe Interface to libgit2
- libraries, Turning a Program into a Library
- lifetime
- LinkedList<T> collection type
- Linux
- literals, in patterns, Literals, Variables, and Wildcards in Patterns
- lock (see mutex)
- logging
- logical operators, Arithmetic, Bitwise, Comparison, and Logical Operators
- log_syntax!() macro, Debugging Macros
- loop (for infinite loops), Loops
- looping expressions, Loops-Why Rust Has loop
- lvalues, Fields and Elements
M
- machine language, Finding Common Data Representations
- machine types, Machine Types-Characters
- macOS
- macros, Macros-Beyond macro_rules!
- avoiding syntax errors during matching, Avoiding Syntax Errors During Matching
- basics, Macro Basics-Repetition
- built-in, Built-In Macros
- debugging, Debugging Macros
- expansion, Macros, Basics of Macro Expansion-Basics of Macro Expansion
- fragment types, Fragment Types-Fragment Types
- importing and exporting, Importing and Exporting Macros
- json!, The json! Macro-Importing and Exporting Macros
- procedural, Beyond macro_rules!
- recursion in, Recursion in Macros
- repetition, Repetition-Repetition
- scoping and hygiene, Scoping and Hygiene-Scoping and Hygiene
- unintended consequences, Unintended Consequences-Unintended Consequences
- using traits with, Using Traits with Macros-Using Traits with Macros
- macro_rules!, Macro Basics
- main(), Handling Errors in main()
- Mandelbrot set
- map adapter, map and filter-map and filter
- map types
- map, defined, HashMap<K, V> and BTreeMap<K, V>
- map.entry(key), Entries
- mapping, Mapping from Pixels to Complex Numbers
- match expressions, A Simple Web Server, if and match
- Matsakis, Niko, Rayon
- max method, max, min
- max_by method, max_by, min_by
- max_by_key method, max_by_key, min_by_key
- memory
- memory ordering, Atomics
- method calls, fully qualified, Fully Qualified Method Calls-Fully Qualified Method Calls
- methods
- min method, max, min
- min_by method, max_by, min_by
- min_by_key method, max_by_key, min_by_key
- Model-View-Controller (MVC), Using Closures Effectively
- modules, Modules-Items, the Building Blocks of Rust
- Morris worm, Why Rust?, Type Safety
- moves, Moves-Moves and Indexed Content
- Mozilla, Why Rust?
- mpsc (multi-producer, single-consumer) communication, Channel Features and Performance
- multiplication (mul), Generic Traits (or How Operator Overloading Works)
- multithreaded programming, Why Rust?
- (see also concurrency, concurrent programming)
- type safety and, Type Safety
- mut (exclusive access), A Simple Function, mut and Mutex
- mut statics, Items, the Building Blocks of Rust
- mutability, interior, Interior Mutability-Interior Mutability
- mutable references (&mutT), References
- mutable statics, Receiving References as Parameters
- mutexes
N
- named-field structs, Named-Field Structs-Named-Field Structs
- namespaces (see modules)
- NaN (not-a-number) values, Equality Tests
- networking, Networking-Networking
- newtypes, Tuple-Like Structs
- normalization
- not-a-number (NaN) values, Equality Tests
- nth method, nth
- null pointers, References Are Never Null
- null raw pointers, Nullable Pointers
- null references, References
- numbers, formatting, Formatting Numbers-Formatting Numbers
- numeric types, Machine Types-Characters
O
- offset method, Unsafe from What?, Raw Pointers, Dereferencing Raw Pointers Safely, Pointer Arithmetic
- operator overloading, Operator Overloading-Other Operators
- operator precedence, Precedence and Associativity
- operators
- arithmetic, Arithmetic, Bitwise, Comparison, and Logical Operators
- bitwise, Arithmetic, Bitwise, Comparison, and Logical Operators
- comparison, Arithmetic, Bitwise, Comparison, and Logical Operators
- logical, Arithmetic, Bitwise, Comparison, and Logical Operators
- Option<&T>, References Are Never Null
- ordered comparison operators, Ordered Comparisons-Ordered Comparisons
- OsStr string type, OsStr and Path
- ownership, Ownership-Rc and Arc: Shared Ownership
P
- panic, Panic-Aborting
- panic!() macro, Panic
- parameters
- PartialEq trait, Equality Tests-Equality Tests
- PartialOrd trait, Ordered Comparisons-Ordered Comparisons
- partition method, partition
- passing by value/by reference, References, IntoIterator Implementations
- Path, OsStr and Path
- Path method, Path and PathBuf Methods-Path and PathBuf Methods
- PathBuf method, Path and PathBuf Methods-Path and PathBuf Methods
- paths, Paths and Imports-Paths and Imports
- patterns, Patterns-Populating a Binary Tree
- @ patterns, @ patterns
- about, Patterns-Patterns
- avoiding syntax errors during matching in macros, Avoiding Syntax Errors During Matching
- for searching text, Patterns for Searching Text
- guards, Pattern Guards
- literals in, Literals, Variables, and Wildcards in Patterns
- match expressions and, if and match
- matching multiple possibilities with |, Matching Multiple Possibilities
- populating a binary tree, Populating a Binary Tree
- reference patterns, Reference Patterns-Reference Patterns
- searching and replacing, Searching and Replacing
- situations that allow, Where Patterns Are Allowed
- struct patterns, Tuple and Struct Patterns
- tuple patterns, Tuple and Struct Patterns
- variables in, Literals, Variables, and Wildcards in Patterns
- wildcards in, Literals, Variables, and Wildcards in Patterns
- peekable iterator, peekable
- pipeline
- plotting
- pointer types, Pointer Types-Raw Pointers
- pointers, Rust's restrictions on, Ownership
- polymorphism, Traits and Generics
- position method, position, rposition, and ExactSizeIterator
- print!(), Writers
- println!(), Printing Errors
- procedural macros, Beyond macro_rules!
- product method, Simple Accumulation: count, sum, product
- profiler, Build Profiles
- propagating errors, Propagating Errors
- Python, Type Safety
R
- race conditions, Why Mutexes Are Not Always a Good Idea
- rand::random(), Buddy Traits (or How rand::random() Works)-Buddy Traits (or How rand::random() Works)
- ranges
- raw interface, A Raw Interface to libgit2-A Raw Interface to libgit2
- raw pointers, Raw Pointers, Raw Pointers-Panic Safety in Unsafe Code
- raw strings, String Literals
- Rayon library, Rayon-Revisiting the Mandelbrot Set
- Rc pointer type, Rc and Arc: Shared Ownership-Rc and Arc: Shared Ownership
- Read trait, Input and Output
- read-only access, shared access as, Sharing Versus Mutation
- read/write locks (RwLock), Read/Write Locks (RwLock<T>)
- readers
- basics, Readers-Readers
- binary data, compression, serialization, Binary Data, Compression, and Serialization
- buffered, Buffered Readers
- collecting lines, Collecting Lines
- defined, Readers and Writers
- opening files, Files
- reading lines, Reading Lines-Reading Lines
- Seek trait, Seeking
- various types, Other Reader and Writer Types-Other Reader and Writer Types
- recursion, Recursion in Macros
- RefCell<T> struct, Interior Mutability
- reference (ref) patterns, Reference Patterns-Reference Patterns
- reference operators, Reference Operators
- reference-counted pointer type, Rc and Arc: Shared Ownership-Rc and Arc: Shared Ownership
- references (pointer type), References, References-Taking Arms Against a Sea of Objects
- "sea of objects" and, Taking Arms Against a Sea of Objects-Taking Arms Against a Sea of Objects
- and iteration, Handling Command-Line Arguments
- as values, References as Values-References to Slices and Trait Objects
- assigning, Assigning References
- borrowing, Closures That Borrow
- borrowing to arbitrary expressions, Borrowing References to Arbitrary Expressions
- comparing, Comparing References
- constraints on borrowing local variables, Borrowing a Local Variable-Borrowing a Local Variable
- constraints on passing references as arguments, Passing References as Arguments
- constraints on receiving as parameters, Receiving References as Parameters-Receiving References as Parameters
- constraints on returning, Returning References
- constraints on structs containing, Structs Containing References-Structs Containing References
- need for distinct lifetime parameters, Distinct Lifetime Parameters
- null pointers and, References Are Never Null
- omitting lifetime parameters from, Omitting Lifetime Parameters-Omitting Lifetime Parameters
- Rust vs. C++, Rust References Versus C++ References
- safety, Reference Safety-Omitting Lifetime Parameters
- shared vs. mutable, References, Sharing Versus Mutation-Sharing Versus Mutation
- to references, References to References
- to slices and trait objects, References to Slices and Trait Objects
- refutable patterns, Where Patterns Are Allowed
- RefWithFlag<'a, T>, Example: RefWithFlag-Example: RefWithFlag
- regular expressions (regex), Regular Expressions-Building Regex Values Lazily
- resource-constrained programming, Preface
- Result type, Result-Why Results?
- catching errors, Catching Errors-Catching Errors
- dealing with errors that “can’t happen”, Dealing with Errors That “Can’t Happen”
- declaring a custom error type, Declaring a Custom Error Type
- handling errors in main(), Handling Errors in main()
- ignoring errors, Ignoring Errors
- key points of design, Why Results?
- printing errors, Printing Errors
- propagating errors, Propagating Errors
- type aliases, Result Type Aliases
- with multiple error types, Working with Multiple Error Types
- Result value, Handling Command-Line Arguments
- return expressions, return Expressions
- rev adapter, Reversible Iterators and rev-Reversible Iterators and rev
- reversible iterators, Reversible Iterators and rev-Reversible Iterators and rev
- Rhs type parameter, Equality Tests
- Rng value, Buddy Traits (or How rand::random() Works)
- routers, callbacks and, Callbacks-Callbacks
- rposition method, position, rposition, and ExactSizeIterator
- Rust (generally)
- basics, A Tour of Rust-Safety Is Invisible
- command-line arguments, Handling Command-Line Arguments-Handling Command-Line Arguments
- community, More Nice Things
- concurrency, Concurrency-Safety Is Invisible
- installation, Downloading and Installing Rust-Downloading and Installing Rust
- reasons for using, Why Rust?-Type Safety
- rules for well-behaved program, Undefined Behavior
- simple function in, A Simple Function
- simple web server, A Simple Web Server-A Simple Web Server
- type safety, Type Safety-Type Safety
- unit testing in, Writing and Running Unit Tests
- rustc, Downloading and Installing Rust, Built-In Macros, Debugging Macros
- rustdoc, Downloading and Installing Rust
- rustup, Downloading and Installing Rust
- RwLock method, Read/Write Locks (RwLock<T>)
S
- safe interface, A Safe Interface to libgit2-A Safe Interface to libgit2
- safety
- safety rules, unsafe code as escape from, Type Safety
- scan adapter, scan
- scoping, Scoping and Hygiene-Scoping and Hygiene
- search
- Seek trait, Seeking
- Self keyword, Self in Traits
- semicolons, Blocks and Semicolons
- SEMVER variable, Building Regex Values Lazily
- Send type, Thread Safety: Send and Sync-Thread Safety: Send and Sync, Unsafe Traits
- serde library/crate, Traits and Other People’s Types, Buddy Traits (or How rand::random() Works), Binary Data, Compression, and Serialization
- serialization, Binary Data, Compression, and Serialization
- Serializer trait, Buddy Traits (or How rand::random() Works)
- Servo, Why Rust?
- sets, defined, HashSet<T> and BTreeSet<T>
- shared access, Sharing Versus Mutation
- shared mutable state, Shared Mutable State-Global Variables
- atomics, Atomics
- conditional variables (Condvar), Condition Variables (Condvar)
- deadlock, Deadlock
- global variables, Global Variables
- multi-producer channels using mutex, Multi-Consumer Channels Using Mutexes
- mut and mutex, mut and Mutex
- mutex basics, What Is a Mutex?-What Is a Mutex?
- mutex in Rust, Mutex<T>
- mutex limitations, Why Mutexes Are Not Always a Good Idea
- poisoned mutexes, Poisoned Mutexes
- read/write locks (RwLock), Read/Write Locks (RwLock<T>)
- shared references, References
- sized type, Sized-Sized
- Sized type, Type Sizes and Alignments
- size_hint method, by_ref, Building Collections: collect and FromIterator
- skip adapter, skip and skip_while
- skip_while adapter, skip and skip_while
- slices, Slices
- spawn function, spawn and join-spawn and join, Sharing Immutable Data Across Threads
- src/bin directory, The src/bin Directory
- stack unwinding, Unwinding
- standard prelude, The Standard Prelude, Using Traits
- statements, expressions vs., An Expression Language
- static (value), Receiving References as Parameters, Items, the Building Blocks of Rust, Global Variables
- static keyword, Items, the Building Blocks of Rust
- static methods, Defining Methods with impl
- static typing, Basic Types
- string literals, String Literals
- string slice (&str), Strings in Memory
- String types, String Types-Other String-Like Types, String and str-Strings as Generic Collections
- accessing text as UTF-8, Accessing Text as UTF-8
- adding text to, Appending and Inserting Text
- as generic collections, Strings as Generic Collections
- Ascii, Example: An Efficient ASCII String Type-Example: An Efficient ASCII String Type
- borrowing slice's content, Borrowing as Other Text-Like Types
- byte strings, Byte Strings
- case conversion for, Case Conversion for Strings
- conventions for searching/iterating text, Conventions for Searching and Iterating
- converting nontextual values to, Converting Other Types to Strings
- creating String values, Creating String Values
- iterating over text, Iterating over Text-Iterating over Text
- non-Unicode strings, Other String-Like Types
- parsing values from, Parsing Other Types from Strings
- patterns for searching text, Patterns for Searching Text
- producing text from UTF-8 data, Producing Text from UTF-8 Data
- putting off allocation, Putting Off Allocation-Putting Off Allocation
- removing text from, Removing Text
- searching and replacing patterns/text, Searching and Replacing
- simple inspection, Simple Inspection
- string literals, String Literals
- strings in memory, Strings in Memory
- trimming text, Trimming
- using, Using Strings
- UTF-8 and, Characters
- strings and text, Strings and Text-The unicode-normalization Crate
- characters (char), Characters (char)-Conversions to and from Integers
- formatting numbers, Formatting Numbers-Formatting Numbers
- formatting text values, Formatting Text Values
- formatting values, Formatting Values-Using the Formatting Language in Your Own Code
- in memory, Strings in Memory
- normalization, Normalization-The unicode-normalization Crate
- passing between Rust and C, Finding Common Data Representations
- regular expressions, Regular Expressions-Building Regex Values Lazily
- String and str types, String and str-Strings as Generic Collections
- Unicode, Some Unicode Background-Text Directionality
- Stroustrup, Bjarne, Why Rust?
- struct expression, Named-Field Structs
- struct patterns, Tuple and Struct Patterns
- structs, Structs-Interior Mutability
- defining methods with impl, Defining Methods with impl-Defining Methods with impl
- deriving common traits for struct types, Deriving Common Traits for Struct Types
- generic, Generic Structs
- hash implementation, Hashing
- implementing with enums, Rich Data Structures Using Enums-Rich Data Structures Using Enums
- interior mutability, Interior Mutability-Interior Mutability
- layout, Struct Layout
- named-field, Named-Field Structs-Named-Field Structs
- references in, Structs Containing References-Structs Containing References
- tuple-like, Tuple-Like Structs
- unit-like, Unit-Like Structs
- with lifetime parameters, Structs with Lifetime Parameters
- submodules, Paths and Imports
- subtraits, Subtraits
- sum method, Simple Accumulation: count, sum, product
- Sync type, Thread Safety: Send and Sync-Thread Safety: Send and Sync, Unsafe Traits
- synchronous channel, Channel Features and Performance
- syntax errors, macros and, Avoiding Syntax Errors During Matching
- systems programming, Preface, Why Rust?
T
- take adapter, take and take_while
- take_while adapter, take and take_while
- tests, Tests and Documentation-Doc-Tests
- text
- accessing as UTF-8, Accessing Text as UTF-8
- adding to String, Appending and Inserting Text
- (see also strings and text)
- case conversion for, Case Conversion for Strings
- conventions for searching/iterating, Conventions for Searching and Iterating
- GapBuffer, Example: GapBuffer-Example: GapBuffer
- iterating over, Iterating over Text-Iterating over Text
- patterns for searching, Patterns for Searching Text
- producing from UTF-8 data, Producing Text from UTF-8 Data
- removing from String, Removing Text
- searching and replacing, Searching and Replacing
- trimming, Trimming
- text directionality, Text Directionality
- text values, Formatting Text Values
- threads
- token tree, Fragment Types
- tokens, Basics of Macro Expansion
- ToOwned trait, ToOwned
- trace_macros!(), Debugging Macros
- trait objects, Trait Objects-Trait Object Layout
- traits
- and other people's types, Traits and Other People’s Types-Traits and Other People’s Types
- buddy, Buddy Traits (or How rand::random() Works)-Buddy Traits (or How rand::random() Works)
- default methods for defining/implementing, Default Methods
- defined, Handling Command-Line Arguments, Traits and Generics
- defining and implementing, Defining and Implementing Traits-Static Methods
- for defining relationships between types, Traits That Define Relationships Between Types-Buddy Traits (or How rand::random() Works)
- for operator overloading, Operator Overloading
- for struct types, Deriving Common Traits for Struct Types
- fully qualified method calls and, Fully Qualified Method Calls-Fully Qualified Method Calls
- generic, Generic Traits (or How Operator Overloading Works)
- Iterator/IntoIterator, The Iterator and IntoIterator Traits-The Iterator and IntoIterator Traits
- iterators and associated types, Associated Types (or How Iterators Work)-Associated Types (or How Iterators Work)
- reverse-engineering bounds, Reverse-Engineering Bounds-Reverse-Engineering Bounds
- Self as type, Self in Traits
- static methods and, Static Methods
- subtraits, Subtraits
- unsafe, Unsafe Traits-Unsafe Traits
- using, Using Traits-Which to Use
- utility (see utility traits)
- with macros, Using Traits with Macros-Using Traits with Macros
- Zeroable, Unsafe Traits-Unsafe Traits
- Travis CI, More Nice Things
- trees, Ownership
- trimming, Trimming
- tuple patterns, Tuple and Struct Patterns
- tuple-like structs, Tuple-Like Structs
- tuples, Tuples-Tuples, Fields and Elements
- type aliases, Result Type Aliases, Items, the Building Blocks of Rust
- type alignment, raw pointers and, Type Sizes and Alignments
- type inference, Basic Types
- type parameters, Parsing Pair Command-Line Arguments, Generic Structs, Generic Functions
- type safety, Type Safety-Type Safety
- type size, raw pointers and, Type Sizes and Alignments
- type-safe language, Type Safety
- types, Basic Types-Beyond the Basics
- and operator overloading, Operator Overloading
- arrays, Arrays
- casts and, Type Casts
- closures and, Function and Closure Types-Function and Closure Types
- Copy types, Copy Types: The Exception to Moves-Copy Types: The Exception to Moves
- for representing sequence of values in memory, Arrays, Vectors, and Slices-Slices
- goals of, Basic Types
- IntoIterator implementations, IntoIterator Implementations-IntoIterator Implementations
- iterators and associated types, Associated Types (or How Iterators Work)-Associated Types (or How Iterators Work)
- machine, Machine Types-Characters
- pointer types, Pointer Types-Raw Pointers
- Result type, Result-Why Results?
- separating methods from definition, Defining Methods with impl
- sized type, Sized-Sized
- slices, Slices
- traits for adding methods to, Traits and Other People’s Types
- traits for defining relationships between, Traits That Define Relationships Between Types-Buddy Traits (or How rand::random() Works)
- tuples, Tuples-Tuples
- user-defined, Items, the Building Blocks of Rust
- vectors, Vectors-Vectors
U
- unary operators, Unary Operators
- undefined behavior, Type Safety, Unsafe from What?, Undefined Behavior-Undefined Behavior
- Unicode, Some Unicode Background-Text Directionality
- ASCII and, ASCII, Latin-1, and Unicode
- character literals, Characters
- Latin-1 and, ASCII, Latin-1, and Unicode
- normalized forms, Normalization Forms
- OsStr and, OsStr and Path
- text directionality, Text Directionality
- unicode-normalization crate, The unicode-normalization Crate
- UTF-8, UTF-8-UTF-8
- unicode-normalization crate, The unicode-normalization Crate
- unit testing, Writing and Running Unit Tests
- unit-like structs, Unit-Like Structs
- Unix
- unsafe blocks, Unsafe Blocks-Example: An Efficient ASCII String Type
- unsafe code, Type Safety, Unsafe Code-Conclusion
- unsafe functions, Unsafe Functions-Unsafe Functions
- unsafe traits, Unsafe Traits-Unsafe Traits
- unsized types, Sized-Sized
- unwinding, Unwinding
- user-defined types, Items, the Building Blocks of Rust
- usize type, Integer Types
- UTF-8, UTF-8-UTF-8
- utility traits, Utility Traits-Borrow and ToOwned at Work: The Humble Cow
- AsRef and AsMut, AsRef and AsMut
- Borrow and BorrowMut, Borrow and BorrowMut-Borrow and BorrowMut
- Clone, Clone
- Copy, Copy
- Cow, Borrow and ToOwned at Work: The Humble Cow
- Default, Default-Default
- Deref and DerefMut, Deref and DerefMut-Deref and DerefMut
- drop, Drop-Drop
- From and Into, From and Into-From and Into
- sized, Sized-Sized
- ToOwned, ToOwned
V
- values
- variable capture, Capturing Variables
- variables
- vec! macro, Repetition-Repetition
- Vec<T> collection type, Arrays, Vectors, and Slices, Vectors, Vec<T>-Rust Rules Out Invalidation Errors
- accessing elements, Accessing Elements-Accessing Elements
- comparing slices, Comparing Slices
- defined, Overview
- growing/shrinking vectors, Growing and Shrinking Vectors-Growing and Shrinking Vectors
- invalidation errors, Rust Rules Out Invalidation Errors
- iteration, Iteration
- joining, Joining
- random elements, Random Elements
- searching, Sorting and Searching
- sorting, Sorting and Searching
- splitting, Splitting-Splitting
- swapping, Swapping
- VecDeque<T> collection type
- vectors, Vectors-Vectors
- versions, Versions
- vertical bar (|), Matching Multiple Possibilities
- virtual table (vtable), Trait Object Layout
W
- weak pointers, Rc and Arc: Shared Ownership
- web server, creating with Rust, A Simple Web Server-A Simple Web Server
- well-behaved program, Undefined Behavior
- well-defined program, Type Safety
- while let loop, Loops
- while loop, Loops
- wildcards, Versions, Literals, Variables, and Wildcards in Patterns
- Windows
- work-stealing, Rayon
- workspaces, Workspaces
- Write trait, Input and Output, Writers
- writers, Writers
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.