在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → 《Rust Cookbook》

《Rust Cookbook》

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:7.99M
  • 下载次数:13
  • 浏览次数:67
  • 发布时间:2023-01-16
  • 实例类别:一般编程问题
  • 发 布 人:老刘
  • 文件格式:.pdf
  • 所需积分:0
 相关标签:

实例介绍

【实例简介】《Rust Cookbook》

【实例截图】

【核心代码】

Table of Contents
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Let us Make System Programming Great Again
Introduction
Setting up Rust in Linux and macOS
Getting ready
How to do it...
Uninstalling Rust
Rust's compiler version
Advanced installation options
Troubleshooting
How it works...
Setting up Rust in Windows
Getting ready
How to do it...
How it works...
Creating your first Rust program
Getting ready
How to do it...
How it works...
Defining a variable assignment
Getting ready
How to do it...
How it works...
Setting up Boolean and the character types
Getting ready
How to do it...
How it works...
Controlling decimal points, number formats, and named arguments
Getting ready
How to do it...
How it works...
Performing arithmetic operations
Getting ready
How to do it...
How it works...
Defining mutable variables
Getting ready
How to do it...
How it works...
Declaring and performing string operations
Getting ready
How to do it...
How it works...
Declaring arrays and using slices in Rust
Getting ready
How to do it...
How it works...
Declaring vectors in Rust
Getting ready
How to do it...
How it works...
Declaring tuples in Rust
Getting ready
How to do it...
How it works...
Performing calculations on two numbers
Getting ready
How to do it...
How it works...
2. Advanced Programming with Rust
Introduction
Defining an expression
Getting ready
How to do it...
How it works...
Defining constants
Getting ready
How to do it...
How it works...
Performing variable bindings
Getting ready
How to do it...
How it works...
Performing type casting in Rust
Getting ready
How to do it...
How it works...
Decision-making with Rust
Getting ready
How to do it...
How it works...
Looping operations in Rust
Getting ready
How to do it...
How it works...
Defining the enum type
Getting ready
How to do it...
How it works...
Defining closures
Getting ready
How to do it...
How it works...
Performing pointer operations in Rust
Getting ready
How to do it...
How it works...
Defining your first user-defined data type
Getting ready
How to do it...
How it works...
Adding functionality to the user-defined data type
Getting ready
How to do it...
How it works...
Similar functionality for different data type
Getting ready
How to do it...
How it works...
3. Deep Diving into Cargo
Introduction
Creating a new project using Cargo
Getting ready
How to do it...
How it works...
Downloading an external crate from crates.io
Getting ready
How to do it...
How it works...
Working on existing Cargo projects
Getting ready
How to do it...
How it works...
Running tests with Cargo
Getting ready
How to do it...
How it works...
Configuration management of the project
Getting ready
How to do it...
How it works...
Building the project on the Travis CI
Getting ready
How to do it...
How it works...
Uploading to crates.io
Getting ready
How to do it...
How it works...
4. Creating Crates and Modules
Introduction
Defining a module in Rust
Getting ready
How to do it...
How it works...
Building a nested module
Getting ready
How to do it...
How it works...
Creating a module with struct
Getting ready
How to do it...
How it works...
Controlling modules
Getting ready
How to do it...
How it works...
Accessing modules
Getting ready
How to do it...
How it works...
Creating a file hierarchy
Getting ready
How to do it...
How it works...
Building libraries in Rust
Getting ready
How to do it...
How it works...
Calling external crates
Getting ready
How to do it...
How it works...
5. Deep Dive into Parallelism
Introduction
Creating a thread in Rust
Getting ready
How to do it...
How it works...
Spawning multiple threads
Getting ready
How to do it...
How it works...
Holding threads in a vector
Getting ready
How to do it...
How it works...
Sharing data between threads using channels
Getting ready
How to do it...
How it works...
Implementing safe mutable access
Getting ready
How to do it...
How it works...
Creating child processes
Getting ready
How to do it...
How it works...
Waiting for a child process
Getting ready
How to do it...
How it works...
Making sequential code parallel
Getting ready
How to do it...
How it works...
6. Efficient Error Handling
Introduction
Implementing panic
Getting ready
How to do it...
How it works...
Implementing Option
Getting ready
How to do it...
How it works...
Creating map combinator
Getting ready
How to do it...
How it works...
Creating and_then combinator
Getting ready
How to do it...
How it works...
Creating map for the Result type
Getting ready
How to do it...
How it works...
Implementing aliases
Getting ready
How to do it...
How it works...
Handling multiple errors
Getting ready
How to do it...
How it works...
Implementing early returns
Getting ready
How to do it...
How it works...
Implementing the try! macro
Getting ready
How to do it...
How it works...
Defining your own error types
Getting ready
How to do it...
How it works...
Implementing the boxing of errors
Getting ready
How to do it...
How it works...
7. Hacking Macros
Introduction
Building macros in Rust
Getting ready
How to do it...
How it works...
Implementing matching in macros
Getting ready
How to do it...
How it works...
Playing with common Rust macros
Getting ready
How to do it...
How it works...
Implementing designators
Getting ready
How to do it...
How it works...
Overloading macros
Getting ready
How to do it...
How it works...
Implementing repeat
Getting ready
How to do it...
How it works...
Implementing DRY
Getting ready
How to do it...
How it works...
8. Integrating Rust with Other Languages
Introduction
Calling C operations from Rust
Getting ready
How to do it...
How it works...
Calling Rust commands from C
Getting ready
How to do it...
How it works...
Calling Rust operations from Node.js apps
Getting ready
How to do it...
How it works...
Calling Rust operations from Python
Getting ready
How to do it...
How it works...
Writing a Python module in Rust
Getting ready
How to do it...
How it works...
9. Web Development with Rust
Introduction
Setting up a web server
Getting ready
How to do it...
How it works...
Creating endpoints
Getting ready
How to do it...
How it works...
Handling JSONRequests
Getting ready
How to do it...
How it works...
Building custom error handlers
Getting ready
How to do it...
How it works...
Hosting templates
Getting ready
How to do it...
How it works...
10. Advanced Web Development in Rust
Introduction
Setting up the API
Getting ready
How to do it...
How it works...
Saving user data in MongoDB
Getting ready
How to do it...
Fetching user data
Getting ready
How to do it...
How it works...
Deleting user data
Getting ready
How to do it...
How it works...
11. Advanced Rust Tools and Libraries
Introduction
Setting up rustup
Getting ready
How to do it...
How it works...
Setting up rustfmt
Getting ready
How to do it...
How it works...
Setting up rust-clippy
Getting ready
How to do it...
How it works...
Setting up and testing with Servo
Getting ready
How to do it...
How it works...
Generating random numbers
Getting ready
How to do it...
How it works...
Writing lines to a file
Getting ready
How to do it...
How it works...
Parsing unstructured JSON
Getting ready
How to do it...
How it works...
Parsing URL from a string
Getting ready
How to do it...
How it works...
Decompressing a tarball
Getting ready
How to do it...
How it works...
Compressing a directory to a tarball
Getting ready
How to do it...
How it works...
Finding file extensions recursively
Getting ready
How to do it...
How it works...

标签:

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警