Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Complete Rust Programming Reference Guide

You're reading from   The Complete Rust Programming Reference Guide Design, develop, and deploy effective software systems using the advanced constructs of Rust

Arrow left icon
Product type Course
Published in May 2019
Publisher Packt
ISBN-13 9781838828103
Length 698 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Vesa Kaihlavirta Vesa Kaihlavirta
Author Profile Icon Vesa Kaihlavirta
Vesa Kaihlavirta
Rahul Sharma Rahul Sharma
Author Profile Icon Rahul Sharma
Rahul Sharma
Claus Matzinger Claus Matzinger
Author Profile Icon Claus Matzinger
Claus Matzinger
Arrow right icon
View More author details
Toc

Table of Contents (29) Chapters Close

Title Page
Copyright
About Packt
Contributors
Preface
1. Getting Started with Rust FREE CHAPTER 2. Managing Projects with Cargo 3. Tests, Documentation, and Benchmarks 4. Types, Generics, and Traits 5. Memory Management and Safety 6. Error Handling 7. Advanced Concepts 8. Concurrency 9. Metaprogramming with Macros 10. Unsafe Rust and Foreign Function Interfaces 11. Logging 12. Network Programming in Rust 13. Building Web Applications with Rust 14. Lists, Lists, and More Lists 15. Robust Trees 16. Exploring Maps and Sets 17. Collections in Rust 18. Algorithm Evaluation 19. Ordering Things 20. Finding Stuff 21. Random and Combinatorial 22. Algorithms of the Standard Library 1. Other Books You May Enjoy Index

Index

A

  • absolute imports / Re-exports
  • Abstract Syntax Tree (AST) / Macros in Rust and their types
  • actix-web framework
    • about / Actix-web basics
    • used, for building bookmarks API / Building a bookmarks API using Actix-web
  • actor model
    • actor / Concurrency using the actor model
    • messages / Concurrency using the actor model
  • Adelson-Velsky and Landis (AVL) trees / Wrap up
  • adjacency list / Graphs
  • advanced traits
    • about / Advanced traits
    • Sized / Sized and ?Sized
    • ?Sized / Sized and ?Sized
    • ToOwned / ToOwned
    • From / From and Into
    • Into / From and Into
    • universal function call syntax / Universal function call syntax
  • advanced types
    • about / Advanced types
    • unsized types / Unsized types
    • function types / Function types
    • Never type ! / Never type ! and diverging functions
    • diverging functions / Never type ! and diverging functions
    • Unions / Unions
    • Cow / Cow
  • affine type system / Move and copy semantics
  • Algebraic Data Types (ADTs) / Enums
  • algorithm
    • programmers code / Other people's code
  • Application Binary Interface (ABI) / Calling C code from Rust
  • approaches, concurrency
    • kernel based / Kernel-based
    • user level / User-level
  • approaches, logging
    • unstructured logging / Unstructured logging
    • structured logging / Structured logging
  • arrays
    • about / Dynamic arrays, Maps
    • dynamic arrays / Dynamic arrays
    • internal arrays / Internal arrays
  • associated type traits / Associated type traits
  • associative arrays / Maps
  • async abstractions
    • about / Async abstractions in Rust
    • Mio / Mio
    • Futures / Futures
    • Tokio / Tokio
  • asynchronous logging / Logging frameworks and their key features
  • asynchronous network I/O
    • synchronous redis server, building / Building a synchronous redis server
    • about / Asynchronous network I/O
    • async abstractions / Async abstractions in Rust
    • asynchronous redis server, building / Building an asynchronous redis server
  • attribute / A tour of the language

B

  • B-Tree
    • about / B-Tree
    • properties / B-Tree
    • IoT database / An IoT database
    • data, adding / Adding stuff
    • data, searching / Searching for stuff
    • walking / Walking the tree
    • wrap up / Wrap up
    • advantages / Upsides
  • backtracking
    • about / Back to front
    • problem solving / Advanced problem solving
    • dynamic programming / Dynamic programming
  • benchmarks
    • about / Benchmarks
    • built-in micro-benchmark / Built-in micro-benchmark harness
    • on stable Rust / Benchmarking on stable Rust
  • Berkley Software Distribution (BSD) / Network programming prelude
  • Big O notation
    • about / The Big O notation, The Big O
    • asymptotic runtime complexity / Asymptotic runtime complexity
    • custom algorithm, creating / Making your own
    • classes / Complexity classes
  • binary search tree
    • about / Binary search tree, Binary searching, Binary search
    • IoT device management / IoT device management
    • multiple devices / More devices
    • devices, finding / Finding the right one, Finding all devices
    • wrap up / Wrap up
    • advantages / Upsides
    • disadvantages / Downsides
    • comparing, with linear and jump search / Wrap up
  • block expression / Blocks and expressions
  • Block Started by Symbol (BSS) / Programs and memory
  • bookmarks API
    • building, with actix-web framework / Building a bookmarks API using Actix-web
  • borrowed string slices / Borrowed strings –
  • borrowing
    • immutable borrows / Borrowing
    • mutable borrows / Borrowing
    • rules / Borrowing rules
    • using / Borrowing in action
    • using, in function / Borrowing in action
    • using, in match / Borrowing in action
    • method types / Method types based on borrowing
  • boxed slice / Favorite transactions
  • BTreeMap
    • about / BTreeMap and BTreeSet
    • architecture / Architecture
    • elements, inserting / Insert
    • elements, accessing / Look up
    • elements, removing / Remove
    • implementing / Wrap up
  • BTreeSet
    • about / BTreeMap and BTreeSet
    • implementing / Wrap up
  • bubble sort / Bubble sort
  • built-in macros
    • in standard library / Built-in macros in the standard library

C

  • C
    • Rust code, calling from / Calling Rust code from C
  • cargo / Installing the Rust compiler and toolchain
  • cascading style sheets (CSS) / What is Rust and why should you care?
  • casting / Casting and coercion
  • C code
    • calling, from Rust / Calling C code from Rust
  • classes
    • about / Complexity classes
    • O(1) / O(1)
    • O(log(n)) / O(log(n))
    • O(n) / O(n)
    • O(n log(n)) / O(n log(n))
    • O(n²) / O(n²)
    • O(2n) / O(2n)
    • comparison / Comparison
  • closures
    • exploring / Closures in depth
    • Fn closures / Fn closures
    • FnMut closures / FnMut closures
    • FnOnce closures / FnOnce closures
  • coercion / Casting and coercion
  • collections, Rust
    • about / Collections
    • arrays / Arrays
    • tuples / Tuples
    • vectors / Vectors
    • hashmaps / Hashmaps
    • slices / Slices
  • collision / Hashing
  • combinators / Recoverable errors
  • combinators on Option/Result
    • about / Combinators on Option/Result
    • common combinators / Common combinators
    • using / Using combinators
    • type signatures / Using combinators
  • Command-Line Interface (CLI) / hyper as a client – building a URL shortener client
  • complete binary tree / Heaps
  • concurrency
    • about / Concurrency
    • approaches / Approaches to concurrency
    • pitfalls / Pitfalls
    • dedalocks / Pitfalls
    • in Rust / Concurrency in Rust
    • thread / Thread basics
    • threads, customizing / Customizing threads
    • data, accessing from threads / Accessing data from threads
    • actor model, using / Concurrency using the actor model
  • concurrency models
    • using, with threads / Concurrency models with threads
    • shared state model / Shared state model
    • mutex / Mutex
  • continuous integration
    • with Travis CI / Continuous integration with Travis CI
  • crates / A tour of the language
  • crates.io
    • reference / Continuous integration with Travis CI
  • custom algorithm
    • creating / Making your own
    • loops / Loops
    • recursion / Recursion
  • custom errors / Custom errors and the Error trait
  • custom hash function
    • creating / Create your own

D

  • declarative macros / Types of macros
  • derive procedural macros / Derive macros
  • deserialization
    • serde, using / Serialization and deserialization using serde
  • destructuring syntax / Let statements
  • dictionaries / Maps
  • difference operation / Difference
  • Dijkstra's algorithm / The shortest path
  • dispatch
    • about / Dispatch
    • static dispatch / Dispatch
    • dynamic dispatch / Dispatch
  • doc attributes
    • about / Writing documentation
    • crate-level attributes / Doc attributes
    • item-level attributes / Doc attributes
    • reference / Doc attributes
  • docs.rs
    • reference / Hosting documentation
  • documentation
    • about / Documentation
    • writing / Writing documentation
    • module level / Writing documentation
    • generating / Generating and viewing documentation
    • viewing / Generating and viewing documentation
    • hosting / Hosting documentation
    • attributes / Doc attributes
    • tests / Documentation tests
  • Domain-Specific Languages (DSLs)
    • about / When to use and not use Rust macros
    • writing, for HashMap initialization / A more involved macro – writing a DSL for HashMap initialization
  • Don't repeat yourself (DRY) principle / Generics
  • DoubleEndedIterator / Reverse
  • doubly-linked list
    • about / Doubly linked list
    • transaction log / A better transaction log
    • log, examining / Examining the log
    • reverse / Reverse
    • wrap up / Wrap up
    • advantages / Upsides
    • disadvantages / Downsides
  • downheap operation / Heaps
  • dynamic array
    • disadvantages / Downsides
  • dynamic arrays
    • about / Dynamic arrays, Sequences
    • transactions / Favorite transactions
    • quick access / Quick access
    • wrap up / Wrap up
    • advantages / Upsides

E

  • early returns pattern / Early returns and the ? operator
  • enums
    • impl blocks / Impl blocks for enums
    • Impl blocks / Impl blocks for enums
    • consts / Consts in structs, enums, and traits
  • Env logger / The env_logger
  • error handling
    • about / Error handling prelude
    • recoverable errors / Error handling prelude
    • fatal errors / Error handling prelude
  • error trait / Custom errors and the Error trait
  • event log / What is logging and why do we need it?
  • express trains / Skip lists
  • external C/C++ libraries
    • using, from Rust / Using external C/C++ libraries from Rust

F

  • failure
    • reference / Custom errors and the Error trait
  • fat tree / B-Tree
  • field init shorthand / Structs
  • First in, first out (FIFO) queue / Concurrency using the actor model
  • Foreign Function Interface (FFI) / Unsafe traits and implementations
  • format specifiers / A tour of the language, Macros in Rust and their types
  • format strings / A tour of the language

G

  • Garbage Collectors (GC) / Memory management and its kinds
  • gecko / What is Rust and why should you care?
  • generic function
    • creating / Generic functions
  • generics
    • about / Generics
    • implementations / Generic implementations
    • using / Using generics
  • generic traits / Generic traits
  • generic type parameters / Generics
  • generic types
    • creating / Creating generic types
    • generic structs / Generic types
    • generic enums / Generic types
  • GeoHashes
    • about / Hashing
    • reference / Hashing
  • glibc library / How do programs use memory?
  • global values
    • about / Global values
    • constants / Constants
    • statics / Statics
    • const fn / Compile time functions – const fn
  • graphs
    • about / Graphs
    • Internet of Things / The literal Internet of Things
    • neighborhood search / Neighborhood search
    • shortest path / The shortest path
    • wrap up / Wrap up
    • advantages / Upsides
    • disadvantages / Downsides
  • greedy algorithms / The shortest path
  • guards / Advanced match patterns and guards

H

  • hash functions
    • about / Hashing
    • properties / Hashing
    • reference / Hashing
    • custom hash function, creating / Create your own
    • rules / Message digestion
  • hashing
    • about / Hashing
    • message digestion / Message digestion
    • implementing / Wrap up
  • HashMap
    • about / HashMap and HashSet
    • architecture / Architecture
    • elements, inserting / Insert
    • elements, accessing / Lookup
    • elements, removing / Remove
  • HashMap initialization
    • DSL, writing / A more involved macro – writing a DSL for HashMap initialization
  • hash maps / Wrap up
  • HashSet / HashMap and HashSet
  • Haskell / What is Rust and why should you care?
  • heap / The heap
  • heaps
    • about / Heaps
    • inbox / A huge inbox
    • messages arrival / Getting messages in
    • messages, sending / Taking messages out
    • wrap up / Wrap up
    • advantages / Upsides
    • disadvantages / Downsides
  • heap sort / Heap sort
  • hyper crate
    • using, with typed HTTP / Typed HTTP with Hyper
    • using, as server APIs / Hyper server APIs – building a URL shortener 
    • using, as client / hyper as a client – building a URL shortener client
  • hyperurl / Hyper server APIs – building a URL shortener 

I

  • impl blocks
    • about / Functions and methods on types
    • on structs / Impl blocks on structs
    • for enums / Impl blocks for enums
    • trait bounds, specifying on impl blocks / Trait bounds on generic functions and impl blocks
  • information retrieval / Finding the best
  • inherited mutability / Interior mutability
  • inherited traits / Inherited traits
  • insertion sort / Adding data, From chaos to order
  • integration tests
    • about / Integration tests
    • creating / First integration test
    • sharing common code / Sharing common code
  • interior mutability
    • uses / Uses of interior mutability
  • internal arrays / Internal arrays
  • Internet of Things (IoT) / Binary search tree
  • Inter Process Communication (IPC) / Kernel-based
  • intersection operation / Intersection
  • Introsort / Quicksort
  • invariants / What is safe and unsafe really?
  • IO Completion Ports (IOCP) / Mio
  • iterator
    • about / Iterators
    • implementing / Implementing a custom iterator
  • iterators / A better transaction log, Slicing and iteration, Iterator

J

  • Java virtual machines (JVM) / What is Rust and why should you care?
  • jump search
    • about / Jump search
    • comparing, with linear and binary search / Wrap up

K

  • knapsack problem
    • about / Packing bags or the 0-1 knapsack problem
    • improving / The knapsack problem improved
  • kqueue / Mio

L

  • language / A tour of the language
  • Last In First Out (LIFO) / The stack, Linked lists
  • lazy_static! macro
    • using, with dynamic statics / Dynamic statics using the lazy_static! macro
  • let pattern
    • about / Advanced match patterns and guards
    • advanced destructure / Advanced let destructure
  • let statements / Let statements
  • lifetimes
    • about / Lifetimes
    • parameters / Lifetime parameters
    • elision / Lifetime elision and the rules
    • rules / Lifetime elision and the rules
    • input lifetime / Lifetime elision and the rules
    • output lifetime / Lifetime elision and the rules
    • in user defined types / Lifetimes in user defined types
    • in impl blocks / Lifetime in impl blocks
    • multiple lifetimes / Multiple lifetimes
    • subtyping / Lifetime subtyping
    • bounds, specifying on generic types / Specifying lifetime bounds on generic types
  • linear congruential generator (LCG) / Pseudo-random numbers, LCG
  • linear search
    • about / Linear searches, Linear search
    • comparing, with binary and jump search / Wrap up
  • LinkedList
    • about / LinkedList<T>
    • architecture / Architecture
    • elements, inserting / Insert
    • elements, accessing / Look up
    • elements, removing / Remove
    • implementation / Wrap up
  • linked list
    • about / Linked lists
    • singly-linked list / Linked lists
    • transaction log / A transaction log
    • entries, adding / Adding entries
    • log replay / Log replay
    • drop() method / After use
    • wrap up / Wrap up
    • benefits / Upsides
    • drawbacks / Downsides
    • doubly-linked list / Doubly linked list
  • linksnap / Building a bookmarks API using Actix-web
  • load factor / Architecture
  • location cache
    • about / A location cache
    • hash function / The hash function
  • log / What is logging and why do we need it?
  • log4rs crate / log4rs
  • log crate / log – Rust's logging facade
  • log filtering / Logging frameworks and their key features
  • logging
    • about / What is logging and why do we need it?
    • approaches / Approaches to logging
  • logging ecosystem
    • logging facade / Logging in Rust
    • implementations / Logging in Rust
  • logging framework
    • need for / The need for logging frameworks
    • about / Logging frameworks and their key features
    • features / Logging frameworks and their key features
    • reference / Structured logging using slog
  • logical errors
    • cases / What is safe and unsafe really?
  • logic gate simulator crate
    • writing / Writing and testing a crate – logic gate simulator
    • testing / Writing and testing a crate – logic gate simulator
  • log message
    • attributes / Logging frameworks and their key features
  • Log Rotation / Logging frameworks and their key features

M

  • macros
    • types / Macros in Rust and their types, Types of macros
    • declarative macros / Types of macros
    • procedural macros / Types of macros
    • creating, with macro_rules! / Creating your first macro with macro_rules!
    • repetitions / Repetitions in macros
    • debugging / Debugging macros
  • macro_rules!
    • used, for creating macros / Creating your first macro with macro_rules!
    • standard library / macro_rules! token types
  • maps
    • about / Maps, Maps and sets, Data structures
    • location cache / A location cache
    • locations, adding / Adding locations
    • locations, fetching / Fetching locations
    • implementing / Wrap up
    • upsides / Upsides
    • downsides / Downsides
    • HashMap / HashMap and HashSet
    • BTreeMap / BTreeMap and BTreeSet
  • marker traits / Marker traits
  • match guards / Match guards
  • matching rules / Creating your first macro with macro_rules!
  • match pattern / Advanced match patterns and guards
  • memory
    • layout process, parts / Programs and memory
    • de-allocation / How do programs use memory?
    • management / Memory management and its kinds
    • management, pitfalls / Memory management pitfalls
    • security / Memory safety
    • about / Types and memory
    • alignment / Memory alignment
    • word size / Memory alignment
    • access granularity / Memory alignment
    • mem module, exploring / Exploring the std::mem module
  • memory allocation
    • approaches / Approaches to memory allocation
    • stack / The stack
    • heap / The heap
  • memory management strategies
    • manual / Memory management and its kinds
    • automatic / Memory management and its kinds
    • semi-automatic / Memory management and its kinds
  • memory safety
    • about / Memory safety, Trifecta of memory safety
    • example / Memory safety
    • ownership / Ownership
    • scopes / A brief on scopes
    • copy semantic / Move and copy semantics
    • move semantics / Move and copy semantics
    • copy semantics / Move and copy semantics
    • borrowing concept / Borrowing
    • lifetimes / Lifetimes
  • merge sort / Merge sort
  • message digestion / Message digestion
  • metaheuristics approaches
    • about / Metaheuristic approaches
    • example / Example metaheuristic – genetic algorithms
  • metaprogramming / What is metaprogramming?
  • methods, exploring
    • reference / Vectors
  • modules / Modules, imports, and use statements, Modules, paths, and imports
  • modulo hashing / Wrap up
  • monomorphization / Generics
  • multi producer, single consumer (mpsc) / Asynchronous channels
  • Mutex
    • shared mutability, with Arc / Shared mutability with Arc and Mutex
    • RwLock / RwLock

N

  • native extensions, Rust
    • creating, for Node.js / Creating native extensions in Rust for Node.js
  • native Python extensions
    • creating, with PyO3 / Creating native Python extensions with PyO3
  • network addresses
    • storing / Storing network addresses
  • Network Address Translation (NAT) / Graphs
  • networked operations, sets
    • about / Networked operations
    • union / Union
    • intersection / Intersection
    • difference / Difference
  • network programming / Network programming prelude
  • Node.js
    • native extensions, creating / Creating native extensions in Rust for Node.js
  • non-deterministic polynomial time (NP) / Exotic things
  • non-recoverable errors
    • about / Non-recoverable errors
    • user-friendly panics / User-friendly panics
  • NP-hard problems / Exotic things
  • N queens / N queens

O

  • ? operator / Early returns and the ? operator
  • O(1) / O(1)
  • O(2n) / O(2n)
  • O(log(n)) / O(log(n))
  • O(n) / O(n)
  • O(n log(n)) / O(n log(n))
  • O(n²) / O(n²)
  • object safety / Trait objects and object safety
  • ok method / Converting between Option and Result
  • ok_or method / Converting between Option and Result
  • Option
    • and Result, conversion between / Converting between Option and Result
  • orphan rule / Trait rules
  • Out Of Memory (OOM) / Memory management pitfalls

P

  • pages / How do programs use memory?
  • page tables / How do programs use memory?
  • panic mechanism / Failing tests, Non-recoverable errors
  • parking lot / Other crates
  • parser / Macros in Rust and their types
  • paths / Modules, paths, and imports
  • Pattern trait
    • reference / Unsafe traits and implementations
  • pointers
    • about / Pointer types in Rust
    • safe pointers (reference) / References – safe pointers
    • raw pointers / Raw pointers
    • smart pointers / Smart pointers
    • reference counted smart pointers / Reference counted smart pointers
  • polynomial time / Exotic things
  • prelude module
    • reference / Option
  • procedural macros
    • about / Procedural macros
    • function-like procedural macro / Procedural macros
    • attribute-like procedural macros / Procedural macros
    • derive procedural macros / Procedural macros
    • crates / Useful procedural macro crates
  • Process Control Block (PCB) / Kernel-based
  • product type / Enums
  • program execution models / Program execution models
  • programming languages
    • safety / What is safe and unsafe really?
    • unsafety / What is safe and unsafe really?
  • programs
    • and memory / Programs and memory
    • memory, using / How do programs use memory?
  • Pseudo-random number generators (PRNGs) / Pseudo-random numbers
  • Pseudo-random numbers
    • about / Pseudo-random numbers
    • linear congruential generator (LCG) / LCG
    • Wichmann-Hill / Wichmann-Hill
    • rand crate / The rand crate
  • PyO3
    • used, for creating Python extensions / Creating native Python extensions with PyO3
  • Python Package Index (PyPI) / Creating native Python extensions with PyO3

Q

  • queues / Data structures
  • quicksort / Quicksort

R

  • re-exports / Re-exports
  • recolor / Red-black tree
  • recoverable errors
    • about / Recoverable errors
    • option / Option
    • unwrapping / Option
    • result / Result
  • recursion / More devices
  • recursive algorithms / Recursion
  • red-black tree
    • about / Red-black tree
    • example / Red-black tree
    • IoT device management / Better IoT device management
    • multiple devices / Even more devices
    • balancing / Balancing the tree
    • device, finding / Finding the right one, now
    • wrap up / Wrap up
    • advantages / Upsides
    • disadvantages / Downsides
  • reference counted smart pointers
    • about / Reference counted smart pointers
    • Rc / Rc<T>
    • interior mutability / Interior mutability
    • Cell / Cell<T>
    • RefCell / RefCell<T>
  • refutable patterns / Let statements
  • relative imports / Re-exports
  • repeaters / Repetitions in macros
  • repetitions
    • in macros / Repetitions in macros
  • Request For Comments (RFC) / What is Rust and why should you care?
  • Resource Acquisition Is Initialization (RAII) / What is Rust and why should you care?
  • ring buffer / Sequences
  • Robin Hood hashing / Architecture
  • rotation / Red-black tree
  • runtime complexity
    • about / In the wild
    • data structures / Data structures
    • sorting / Everyday things
    • exotic things / Exotic things
  • Rust
    • about / What is Rust and why should you care?
    • reference / What is Rust and why should you care?
    • primitive types / Primitive types
    • variables, declaring / Declaring variables and immutability
    • immutability, declaring / Declaring variables and immutability
    • functions / Functions
    • closures / Closures
    • strings / Strings
    • conditionals / Conditionals and decision making
    • decision making / Conditionals and decision making
    • match expressions / Match expressions
    • loops / Loops
    • user-defined types / User-defined types
    • functions, implementations on type / Functions and methods on types
    • methods, implementations on type / Functions and methods on types
    • modules / Modules, imports, and use statements
    • imports / Modules, imports, and use statements
    • use statements / Modules, imports, and use statements
    • collections / Collections
    • iterators / Iterators
    • pointer types / Pointer types in Rust
    • selective privacy / Selective privacy
    • macros / Macros in Rust and their types
    • unsafety, reference / What is safe and unsafe really?
    • C code, calling from / Calling C code from Rust
    • calling, from C / Calling Rust code from C
    • external C/C++ libraries, using / Using external C/C++ libraries from Rust
    • logging / Logging in Rust
  • rustc / Installing the Rust compiler and toolchain, A tour of the language
  • Rust compiler
    • installing / Installing the Rust compiler and toolchain
    • installing, rustup.rs used / Using rustup.rs
  • Rust formatting tool (rustfmt) / Using rustup.rs
  • Rust Language Server (RLS for IDEs) / Using rustup.rs
  • Rust macros
    • using / When to use and not use Rust macros
    • avoiding / When to use and not use Rust macros
  • Rust playground / A tour of the language
  • Rust toolchain
    • installing / Installing the Rust compiler and toolchain
    • channels / Installing the Rust compiler and toolchain
  • rustup.rs
    • used, for installing Rust compiler / Using rustup.rs
    • reference / Using rustup.rs

S

  • scope / Blocks and expressions
  • search
    • about / Finding the best, Search
    • linear search / Linear searches, Linear search
    • jump search / Jump search
    • binary search tree / Binary searching, Binary search
  • selection sort / Everyday things
  • sequences
    • about / Sequences
    • Vec / Vec<T> and VecDeque<T>
    • VecDeque / Vec<T> and VecDeque<T>
    • LinkedList / LinkedList<T>
  • serialization
    • serde, using / Serialization and deserialization using serde
  • sets
    • about / Sets, Maps and sets, Data structures
    • network addresses, storing / Storing network addresses
    • networked operations / Networked operations
    • implementing / Wrap up
    • upsides / Upsides
    • HashSet / HashMap and HashSet
    • BTreeSet / BTreeMap and BTreeSet
  • shared state model
    • about / Shared state model, Shared ownership with Arc
    • shared ownership with Arc / Shared ownership with Arc
    • shared data, mutating from threads / Mutating shared data from threads
  • shell sort / Shell sort
  • signatures / Hashing
  • simple traits / Simple traits
  • singly-linked list / Linked lists
  • skip list
    • about / Skip lists, The list, Thoughts and discussion, Data structures
    • transaction log / The best transaction log
    • data, adding / Adding data
    • leveling up / Leveling up
    • jumps / Jumping around
    • advantages / Upsides
    • disadvantages / Downsides
  • slices module
    • about / Slicing and iteration, Slices
    • reference / Slices
  • slog
    • used, for structured logging / Structured logging using slog
  • smart pointers
    • about / Smart pointers
    • drop / Drop
    • Deref / Deref and DerefMut
    • DerefMut / Deref and DerefMut
    • types / Types of smart pointers
    • Box / Box<T>
  • socket, categories / Network programming prelude
  • Sockets / Network programming prelude
  • sorted insert / Adding data
  • sorting
    • about / Sorting
    • stable sorting / Stable sorting
    • unstable sorting / Unstable sorting
  • sorting algorithms
    • stable / From chaos to order
    • hybrid / From chaos to order
    • in-place / From chaos to order
  • space / The Big O notation
  • stable sorting / Stable sorting
  • stack / The stack
  • stacks / Data structures
  • standard library
    • asynchronous channels / Asynchronous channels
    • synchronous channels / Synchronous channels
    • built-in macros / Built-in macros in the standard library
  • standard library traits
    • exploring / Exploring standard library traits
  • strings / Borrowed strings – , When to use
    • about / Strings
    • owned strings / Owned strings – String
    • dicing / Slicing and dicing strings
    • slicing / Slicing and dicing strings
    • using, in functions / Using strings in functions
    • joining / Joining strings
  • structs
    • impl blocks / Impl blocks on structs
    • consts / Consts in structs, enums, and traits
  • structured logging
    • slog, using / Structured logging using slog
  • Structured Query Language (SQL) / Sets
  • stylo / What is Rust and why should you care?
  • sum type / Enums

T

  • testing
    • motivation / Motivation for testing
  • testing primitives
    • about / Testing primitives
    • attributes / Attributes
    • assertion macros / Assertion macros
  • tests
    • organizing / Organizing tests
  • thread safety
    • in Rust / thread-safety in Rust
    • about / What is thread-safety?
    • Send type / Send
    • Sync trait / Sync
  • time / The Big O notation
  • tokenizer / Macros in Rust and their types
  • tokens / Macros in Rust and their types
  • token trees / Macros in Rust and their types
  • token types, macro_rules!
    • block / macro_rules! token types
    • expr / macro_rules! token types
    • ident / macro_rules! token types
    • item / macro_rules! token types
    • meta / macro_rules! token types
    • pat / macro_rules! token types
    • path / macro_rules! token types
    • stmt / macro_rules! token types
    • tt / macro_rules! token types
    • ty / macro_rules! token types
    • lifetime / macro_rules! token types
    • literal / macro_rules! token types
  • trait bounds
    • about / Using traits with generics – trait bounds
    • specifying, on types / Trait bounds on types
    • specifying, on impl blocks / Trait bounds on generic functions and impl blocks
    • specifying, on generic functions / Trait bounds on generic functions and impl blocks
    • declaring, with impl trait syntax / Trait bounds with impl trait syntax
  • trait coherence rule / Trait rules
  • trait objects
    • used, for polymorphism / True polymorphism using trait objects
    • about / Trait objects, Trait objects and object safety
  • traits
    • about / Abstracting behavior with traits, Traits
    • abstracting behavior / Abstracting behavior with traits
    • associated methods / Traits
    • instance methods / Traits
    • forms / The many forms of traits
    • simple traits / Simple traits
    • generic traits / Generic traits
    • associated type traits / Associated type traits
    • inherited traits / Inherited traits
    • using, with generics / Using traits with generics – trait bounds
    • composing, as bounds with + symbol / Using + to compose traits as bounds
    • type, duplicating / Duplicating types via traits
    • Copy traits / Copy
    • Clone trait / Clone
    • ownership / Ownership in action
    • consts / Consts in structs, enums, and traits
  • Travis CI
    • used, for continuous integration / Continuous integration with Travis CI
    • reference / Continuous integration with Travis CI
  • trees / Data structures
  • trie
    • about / Trie
    • IoT device management / More realistic IoT device management
    • paths, adding / Adding paths
    • walking / Walking
    • wrap up / Wrap up
    • advantages / Upsides
    • disadvantages / Downsides
  • tuple struct / Structs
  • type alias / Writing and testing a crate – logic gate simulator
  • type systems / Type systems and why they matter
  • type system tidbits
    • about / Type system tidbits
    • block expression / Blocks and expressions
    • let statements / Let statements
    • loop, using as expression / Loop as an expression
    • type clarity / Type clarity and sign distinction in numeric types
    • sign distinction in numeric types / Type clarity and sign distinction in numeric types
    • type inference / Type inference
    • type aliases / Type aliases

U

  • union operation / Union
  • unit struct / Structs
  • unit tests
    • about / Unit tests
    • running / Running tests
    • code, isolating / Isolating test code
    • failing / Failing tests
    • ignoring / Ignoring tests
  • Universal Function Call Syntax (UFCS) / Universal function call syntax
  • unsafe blocks / Unsafe functions and blocks
  • unsafe function / Unsafe functions and blocks
  • unsafe implementations / Unsafe traits and implementations
  • unsafe traits / Unsafe traits and implementations
  • unsized types / Slices
  • unstable sorting / Unstable sorting
  • upheap operation / Heaps
  • URL shortener client
    • building / hyper as a client – building a URL shortener client
  • URL shortener server
    • building / Hyper server APIs – building a URL shortener 
  • use case, macros
    • tests, writing / Macro use case – writing tests
  • user-defined types, Rust
    • about / User-defined types
    • structs / Structs
    • enums / Enums
  • user categories, application logging
    • system administrators / What is logging and why do we need it?
    • developers / What is logging and why do we need it?
    • network security teams / What is logging and why do we need it?

V

  • variants / Enums
  • Vec
    • about / Vec<T> and VecDeque<T>
    • architecture / Architecture
    • elements, inserting / Insert
    • elements, accessing / Look up
    • items, removing / Remove
  • VecDeque
    • about / Vec<T> and VecDeque<T>
    • architecture / Architecture
    • elements, inserting / Insert
    • elements, accessing / Look up
    • elements, removing / Remove

W

  • web applications
    • building / Web applications in Rust
  • web frameworks
    • need for / Web frameworks
  • word counter
    • fixing / Exercise – fixing the word counter

Z

  • zero-sized types (ZSTs) / Look up
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image