The Rust programming language /
"The Rust Programming Language is the official book on Rust; a community-developed, systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. Rust's memory safety guarantees, enforced at compile time, safeguard your programs against the many p...
Clasificación: | Libro Electrónico |
---|---|
Autores principales: | , |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
San Francisco :
No Starch Press, Inc.,
2018.
|
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Intro; Brief Contents; Contents in Detail; Foreword; Acknowledgments; Introduction; Who Rust Is For; Teams of Developers; Students; Companies; Open Source Developers; People Who Value Speed and Stability; Who This Book Is For; How to Use This Book; Contributing to the Book and Resources; Chapter 1: Getting Started; Installation; Local Documentation; Troubleshooting; Updating and Uninstalling; Installing rustup on Windows; Installing rustup on Linux or macOS; Hello, World!; Creating a Project Directory; Writing and Running a Rust Program; Anatomy of a Rust Program
- Compiling and Running Are Separate StepsHello, Cargo!; Creating a Project with Cargo; Building and Running a Cargo Project; Building for Release; Cargo as Convention; Summary; Chapter 2: Programming a Guessing Game; Setting Up a New Project; Processing a Guess; Storing Values with Variables; Handling Potential Failure with the Result Type; Printing Values with println! Placeholders; Testing the First Part; Generating a Secret Number; Using a Crate to Get More Functionality; Generating a Random Number; Comparing the Guess to the Secret Number; Allowing Multiple Guesses with Looping
- Quitting After a Correct GuessHandling Invalid Input; Summary; Chapter 3: Common Programming Concepts; Variables and Mutability; Differences Between Variables and Constants; Shadowing; Data Types; Scalar Types; Compound Types; Functions; Function Parameters; Statements and Expressions; Functions with Return Values; Comments; Control Flow; if Expressions; Repetition with Loops; Summary; Chapter 4: Understanding Ownership; What Is Ownership?; Return Values and Scope; Ownership and Functions; The String Type; Variable Scope; Ownership Rules; References and Borrowing; Mutable References
- Dangling ReferencesThe Rules of References; The Slice Type; String Slices; Other Slices; Summary; Memory and Allocation; Chapter 5: Using Structs to Structure Related Data; Defining and Instantiating Structs; Using the Field Init Shorthand When Variables and Fields Have the Same Name; Creating Instances from Other Instances with Struct Update Syntax; Using Tuple Structs Without Named Fields to Create Different Types; Unit-Like Structs Without Any Fields; An Example Program Using Structs; Refactoring with Tuples; Refactoring with Structs: Adding More Meaning
- Adding Useful Functionality with Derived TraitsMethod Syntax; Defining Methods; Multiple impl Blocks; Associated Functions; Methods with More Parameters; Summary; Chapter 6: Enums and Pattern Matching; Defining an Enum; Enum Values; The Option Enum and Its Advantages over Null Values; The match Control Flow Operator; Patterns That Bind to Values; Matching with Option; Matches Are Exhaustive; The _ Placeholder; Concise Control Flow with if let; Summary; Chapter 7: Using Modules to Reuse and Organize Code; mod and the Filesystem; Module Definitions; Moving Modules to Other Files