Programming with Rust
Home > Computing and Information Technology > Computer programming / software engineering > Programming and scripting languages: general > Programming with Rust
Programming with Rust

Programming with Rust

|
     0     
5
4
3
2
1




International Edition


About the Book

Make Rust a key tool in your arsenal, and access one of the industry's fastest-growing areas of opportunity. Rust's exciting innovations have made it the most loved programming language in Stack Overflow's influential survey for five straight years--but its steep learning curve has made many other developers reluctant to dive in. Now, with a growing commitment to Rust from many of the world's leading development organizations, it's the perfect time to start--especially now that there's an up-to-date, accessible, example-rich book to guide you. In Programming with Rust, long-time enterprise developer Donis Marshall has made Rust easier to understand than ever, with a guide expertly organized into short, bite-sized chapters that bring you up-to-speed fast. Written for developers at all levels, Marshall starts with the absolute basics, and thoroughly demystifies the Rust technical advances that make it so attractive for next-generation development. Everything's here, from types and assignments to ownership, lifetimes, traits, and crates. Marshall even offers indispensable expert advice for unit testing, handling unsafe code, interoperating with legacy code bases, and using Rust's increasingly robust tools. Contains short, easy-to-consume chapters Clearly illustrates innovative features such as lifetimes, ownerships, and patterns Practical, focused, complete, and up-to-date Written for newcomers and professional developers alike More than just a new language, Rust represents a philosophical shift in how you code. In Programming with Rust, you'll master both the techniques and the mindset.

Table of Contents:
Chapter 1: Introduction to Rust 1 Introduction 1 Features 4 Rust Terminology 6 Tools 7 Summary 8   Chapter 2: Getting Started 9 Preliminaries 9 Rust and Windows 10 Installing Rust 10 Advanced Rustup 11 “Hello, World” 11 Compile and Run 12 Cargo 13 Library 15 Comments 17 Published Crates 20 Main Function 21 Command-Line Arguments 22 Summary 23   Chapter 3: Variables 25 Terminology 25 Variables 26 Primitives 26 Integer Types 27 Overflow 28 Notations 29 Floating Point Types 30 Floating Point Constants 30 Infinity 31 NaN 31 Numeric Ranges 32 Casting 33 Boolean Types 34 Char 34 Pointers 35 Operators 37 Summary 40   Chapter 4: Strings 41 Str 41 String 42 Length 43 Extending a String 44 Capacity 45 Accessing a String Value 46 String Characters 48 Deref Coercion 48 Formatted String 49 Helpful Functions 49 Summary 52   Chapter 5: Console 53 Print 53 Positional Arguments 54 Variable Arguments 55 Named Arguments 55 Padding, Alignment, and Precision 56 Base 58 Developer Facing 59 Write! Macro 60 Display Trait 60 Debug Trait 62 Format! Macro 63 Console Read and Write 63 Summary 64   Chapter 6: Control Flow 65 The if Expression 65 The while Expression 68 The for Expression 70 The loop Expression 73 The Iterator Trait 76 Summary 78   Chapter 7: Collections 79 Arrays 79 Vectors 86 HashMap 91 Summary 95   Chapter 8: Ownership 97 Stack and Heap Memory 98 Shallow versus Deep Copy 98 Car Analogy 99 Move Semantics 99 Borrow 101 Copy Semantics 101 Clone Trait 102 Copy Trait 103 Clone Trait 104 Summary 105   Chapter 9: Lifetimes 107 Introduction to Lifetimes 108 Function Headers and Lifetimes 109 Lifetime Annotation 111 Lifetime Elision 112 Complex Lifetimes 113 Sharing a Lifetime 114 Static Lifetimes 115 Structs and Lifetimes 116 Methods and Lifetimes 116 Subtyping Lifetimes 118 Anonymous Lifetimes 120 Generics and Lifetimes 121 Summary 121   Chapter 10: References 123 Declaration 124 Borrowing 124 Dereferencing 125 Comparing References 126 Reference Notation 127 Reference to Reference 128 Mutability 129 Limits to Multiple Borrowers 130 Summary 131   Chapter 11: Functions 133 Function Definition 133 Parameters 134 Function Return 136 Const Functions 138 Nested Functions 139 Function Pointers 140 Function Aliases 142 Summary 143   Chapter 12: Error Handling 145 Handling Error Handling 145 The Result Enum 146 The Option Enum 147 Panics 148 Unwrapping 154 Match Pattern for Result and Option 156 Map 158 Rich Errors 160 Custom Errors 161 Summary 163   Chapter 13: Structures 165 Alternate Initialization 167 Move Semantics 169 Mutability 170 Methods 170 Self 172 Associated Functions 173 Impl Blocks 174 Operator Overloading 175 Tuple Struct 179 Summary 180   Chapter 14: Generics 181 Generic Functions 182 Bounds 186 The where Clause 188 Structs 190 Associated Functions 194 Enums 195 Generic Traits 197 Explicit Specialization 200 Summary 205   Chapter 15: Patterns 207 Let Statement 207 Wildcards 208 Complex Patterns 209 Ownership 210 Irrefutable 212 Ranges 213 Multiple Patterns 214 Control Flow 215 Structs 216 Functions 219 Match Expressions 220 Match Guards 224 Summary 227   Chapter 16: Closures 229 “Hello, World” 229 Closure Syntax 230 Closed Over 231 Closures as Function Arguments 233 Closures as Function Return Values 234 Implementation of Closures 235 Matrix Example 242 Summary 244   Chapter 17: Traits 245 Trait Definition 245 Default Functions 248 Marker Trait 249 Associated Functions 249 Associated Types 251 Extension Methods 253 Fully Qualified Syntax 254 Supertraits 257 Static Dispatch 260 Dynamic Dispatch 262 Enums and Traits 263 Summary 265   Chapter 18: Threads 1 267 Synchronous Function Calls 268 Threads 269 The Thread Type 273 Processor Time 274 Builder 275 Communicating Sequential Process 276 Asynchronous Channel 277 Synchronous Channel 279 Rendezvous Channel 280 The try Methods 281 Store Example 286 Summary 290   Chapter 19: Threads 2 291 Mutex 291 Nonscoped Mutex 294 Mutex Poisoning 296 Reader-Writer Lock 297 Condition Variables 299 Atomic Operations 301 Summary 305   Chapter 20: Memory 307 Stacks 307 Static Values 309 The Heap 310 Interior Mutability 312 RefCell 316 OnceCell 318 Summary 319   Chapter 21: Macros 321 Tokens 322 Declarative Macros 323 Repetition 325 Multiple Macro Matchers 327 Procedural Macros 328 Derive Macros 329 Attribute Macros 332 Function-Like Macros 334 Summary 335   Chapter 22: Interoperability 337 Foreign Function Interface 337 Basic Example 339 Libc Crate 341 Structs 342 Bindgen 346 C Calling Rust Functions 347 Cbindgen 348 Summary 351   Chapter 23: Modules 353 Module Items 354 Module Files 358 The path Attribute 360 Functions and Modules 361 The crate, super, and self Keywords 362 Legacy Model 363 Summary 365   Index 367


Best Sellers


Product Details
  • ISBN-13: 9780137889655
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison Wesley
  • Height: 232 mm
  • No of Pages: 400
  • Spine Width: 26 mm
  • Width: 189 mm
  • ISBN-10: 0137889658
  • Publisher Date: 03 Jan 2024
  • Binding: Paperback
  • Language: English
  • Returnable: Y
  • Weight: 778 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Programming with Rust
Pearson Education (US) -
Programming with Rust
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Programming with Rust

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!