Rust standard library cookbook over 75 recipes to leverage the power of rust
Explore the Rust Standard library and compose algorithms with minimal dependency on external libraries About This Book Develop high-quality, fast, and portable applications by leveraging the power of Rust's Standard library. Practical recipes that will help you work with the Standard library to...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham ; Mumbai :
Packt Publishing
2018.
|
Edición: | First edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009631758206719 |
Tabla de Contenidos:
- Cover
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Table of Contents
- Preface
- Chapter 1: Learning the Basics
- Introduction
- Concatenating strings
- Getting ready
- How to do it...
- How it works...
- Using the format! macro
- How to do it...
- How it works...
- There's more...
- Providing a default implementation
- How to do it...
- How it works...
- Using the constructor pattern
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Using the builder pattern
- How to do it...
- How it works...
- There's more...
- Parallelism through simple threads
- How to do it...
- How it works...
- There's more...
- See also
- Generating random numbers
- How to do it...
- How it works...
- There's more...
- Querying with regexes
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Accessing the command line
- How to do it...
- How it works...
- There's more...
- Interacting with environment variables
- How to do it...
- How it works...
- There's more...
- Reading from stdin
- How to do it...
- How it works...
- There's more...
- See also
- Accepting a variable number of arguments
- Getting started
- How to do it...
- How it works...
- There's more...
- See also
- Chapter 2: Working with Collections
- Introduction
- Using a vector
- How to do it...
- How it works...
- There's more...
- Using a string
- How to do it...
- How it works...
- There's more...
- Accessing collections as iterators
- How to do it...
- How it works...
- There's more...
- See also
- Using a VecDeque
- How to do it...
- How it works...
- There's more...
- Using a HashMap
- How to do it...
- How it works...
- There's more...
- Using a HashSet
- How to do it...
- How it works...
- There's more.
- Creating an own iterator
- How to do it...
- How it works...
- There's more...
- Using a slab
- How to do it...
- How it works...
- There's more...
- Chapter 3: Handling Files and the Filesystem
- Introduction
- Working with text files
- How to do it...
- How it works...
- There's more...
- See also
- Handling bytes
- Getting ready
- How to do it...
- How it works...
- There's more...
- Working with binary files
- How to do it...
- How it works...
- There's more...
- See also
- Compressing and decompressing data
- How to do it...
- How it works...
- There's more...
- Traversing the filesystem
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Finding files with glob patterns
- How to do it...
- How it works...
- See also
- Chapter 4: Serialization
- Introduction
- Working with CSV
- Getting started
- How to do it...
- How it works...
- There's more...
- See also
- Serialization basics with Serde
- How to do it...
- How it works...
- There's more...
- See also
- Working with TOML
- Getting started
- How to do it...
- How it works...
- There's more...
- See also
- Working with JSON
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Building JSON dynamically
- How to do it...
- How it works...
- See also
- Chapter 5: Advanced Data Structures
- Introduction
- Creating lazy static objects
- How to do it...
- How it works...
- There's more...
- See also
- Working with bit fields
- Getting started
- How to do it...
- How it works...
- See also
- Providing custom derives
- Getting started
- How to do it...
- How it works...
- There's more...
- Converting types into each other
- How to do it...
- How it works...
- Boxing data
- How to do it...
- How it works...
- There's more...
- See also.
- Sharing ownership with smart pointers
- How to do it...
- How it works...
- There's more...
- See also
- Working with interior mutability
- How to do it...
- How it works...
- There's more...
- See also
- Chapter 6: Handling Errors
- Introduction
- Providing user-defined error types
- How to do it...
- How it works...
- There's more...
- Providing logging
- How to do it...
- How it works...
- There's more...
- Creating a custom logger
- How to do it...
- How it works...
- There's more...
- See also
- Implementing the Drop trait
- How to do it...
- How it works...
- There's more...
- See also
- Understanding RAII
- How to do it...
- How it works...
- There's more...
- See also
- Chapter 7: Parallelism and Rayon
- Introduction
- Parallelizing iterators
- How to do it...
- How it works...
- See also
- Running two operations together
- How to do it...
- How it works...
- There's more...
- See also
- Sharing resources in multithreaded closures
- How to do it...
- How it works...
- See also
- Sending data across threads
- How to do it...
- How it works...
- There's more...
- See also
- Accessing resources in parallel with RwLocks
- How to do it...
- How it works...
- There's more...
- See also
- Atomically accessing primitives
- How to do it...
- How it works...
- There's more...
- See also
- Putting it all together in a connection handler
- How to do it...
- How it works...
- There's more...
- Chapter 8: Working with Futures
- Introduction
- Providing futures with a CPU pool and waiting for them
- How to do it...
- How it works...
- Handling errors in futures
- How to do it...
- How it works...
- See also
- Combining futures
- How to do it...
- How it works...
- See also
- Using Streams
- How to do it...
- How it works...
- Using Sinks
- How to do it.
- How it works...
- Using the oneshot channel
- How to do it...
- How it works...
- Returning futures
- How to do it...
- How it works...
- There's more...
- See also
- Locking resources with BiLocks
- How to do it...
- How it works...
- Chapter 9: Networking
- Introduction
- Setting up a basic HTTP server
- Getting ready
- How to do it...
- How it works...
- See also
- Configuring an HTTP server to perform echoing and routing
- Getting ready
- How to do it...
- How it works...
- Configuring an HTTP server to perform file serving
- How to do it...
- How it works...
- There's more...
- See also
- Making requests to APIs
- How to do it...
- How it works...
- There's more...
- See also
- Chapter 10: Using Experimental Nightly Features
- Introduction
- Iterating over an inclusive range
- How to do it...
- How it works...
- See also
- Returning abstract types
- How to do it...
- How it works...
- There's more...
- See also
- Composing functions
- How to do it...
- How it works...
- See also
- Filtering strings efficiently
- How to do it...
- How it works...
- See also
- Stepping through an iterator in regular intervals
- How to do it...
- How it works...
- See also
- Benchmarking your code
- How to do it...
- How it works...
- There's more...
- See also
- Using generators
- How to do it...
- How it works...
- See also
- Other Books You May Enjoy
- Index.