博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Rust 编程语言极简教程 --- 实例学习
阅读量:6438 次
发布时间:2019-06-23

本文共 3323 字,大约阅读时间需要 11 分钟。

Rust 编程语言极简教程 --- 实例学习

安装

$ curl https://sh.rustup.rs -sSf | shinfo: downloading installerWelcome to Rust!This will download and install the official compiler for the Rust programming language, and its package manager, Cargo.           ...

Rust 实例学习

Introduction

  1. Hello World
    1.1. Comments
    1.2. Formatted print
    1.2.1. Debug
    1.2.2. Display
    1.2.2.1. Testcase: List
    1.2.3. Formatting
  2. Primitives
    2.1. Literals and operators
    2.2. Tuples
    2.3. Arrays and Slices
  3. Custom Types
    3.1. Structures
    3.2. Enums
    3.2.1. use
    3.2.2. C-like
    3.2.3. Testcase: linked-list
    3.3. constants
  4. Variable Bindings
    4.1. Mutability
    4.2. Scope and Shadowing
    4.3. Declare first
  5. Types
    5.1. Casting
    5.2. Literals
    5.3. Inference
    5.4. Aliasing
  6. Conversion
    6.1. From and Into
    6.2. To and From String
  7. Expressions
  8. Flow Control
    8.1. if/else
    8.2. loop
    8.2.1. Nesting and labels
    8.2.2. Returning from loops
    8.3. while
    8.4. for and range
    8.5. match
    8.5.1. Destructuring
    8.5.1.1. tuples
    8.5.1.2. enums
    8.5.1.3. pointers/ref
    8.5.1.4. structs
    8.5.2. Guards
    8.5.3. Binding
    8.6. if let
    8.7. while let
  9. Functions
    9.1. Methods
    9.2. Closures
    9.2.1. Capturing
    9.2.2. As input parameters
    9.2.3. Type anonymity
    9.2.4. Input functions
    9.2.5. As output parameters
    9.2.6. Examples in std
    9.2.6.1. Iterator::any
    9.2.6.2. Iterator::find
    9.3. Higher Order Functions
  10. Modules
    10.1. Visibility
    10.2. Struct visibility
    10.3. The use declaration
    10.4. super and self
    10.5. File hierarchy
  11. Crates
    11.1. Library
    11.2. extern crate
  12. Attributes
    12.1. dead_code
    12.2. Crates
    12.3. cfg
    12.3.1. Custom
  13. Generics
    13.1. Functions
    13.2. Implementation
    13.3. Traits
    13.4. Bounds
    13.4.1. Testcase: empty bounds
    13.5. Multiple bounds
    13.6. Where clauses
    13.7. New Type Idiom
    13.8. Associated items
    13.8.1. The Problem
    13.8.2. Associated types
    13.9. Phantom type parameters
    13.9.1. Testcase: unit clarification
  14. Scoping rules
    14.1. RAII
    14.2. Ownership and moves
    14.2.1. Mutability
    14.3. Borrowing
    14.3.1. Mutability
    14.3.2. Freezing
    14.3.3. Aliasing
    14.3.4. The ref pattern
    14.4. Lifetimes
    14.4.1. Explicit annotation
    14.4.2. Functions
    14.4.3. Methods
    14.4.4. Structs
    14.4.5. Bounds
    14.4.6. Coercion
    14.4.7. static
    14.4.8. elision
  15. Traits
    15.1. Derive
    15.2. Operator Overloading
    15.3. Drop
    15.4. Iterators
    15.5. Clone
  16. macro_rules!
    16.1. Syntax
    16.1.1. Designators
    16.1.2. Overload
    16.1.3. Repeat
    16.2. DRY (Don't Repeat Yourself)
    16.3. DSL (Domain Specific Languages)
    16.4. Variadics
  17. Error handling
    17.1. panic
    17.2. Option & unwrap
    17.2.1. Combinators: map
    17.2.2. Combinators: and_then
    17.3. Result
    17.3.1. map for Result
    17.3.2. aliases for Result
    17.3.3. Early returns
    17.3.4. Introducing ?
    17.4. Multiple error types
    17.4.1. Pulling Results out of Options
    17.4.2. Defining an error type
    17.4.3. Boxing errors
    17.4.4. Other uses of ?
    17.4.5. Wrapping errors
    17.5. Iterating over Results
  18. Std library types
    18.1. Box, stack and heap
    18.2. Vectors
    18.3. Strings
    18.4. Option
    18.5. Result
    18.5.1. ?
    18.6. panic!
    18.7. HashMap
    18.7.1. Alternate/custom key types
    18.7.2. HashSet
  19. Std misc
    19.1. Threads
    19.1.1. Testcase: map-reduce
    19.2. Channels
    19.3. Path
    19.4. File I/O
    19.4.1. open
    19.4.2. create
    19.5. Child processes
    19.5.1. Pipes
    19.5.2. Wait
    19.6. Filesystem Operations
    19.7. Program arguments
    19.7.1. Argument parsing
    19.8. Foreign Function Interface
  20. Meta
    20.1. Documentation
    20.2. Testing
  21. Unsafe Operations

转载地址:http://cmkwo.baihongyu.com/

你可能感兴趣的文章
彻底理解javascript中的this指针
查看>>
SAS去空格
查看>>
Spring Cloud构建微服务架构(二)服务消费者
查看>>
这些老外的开源技术养活了一票国产软件
查看>>
Maven实战(六)--- dependencies与dependencyManagement的区别
查看>>
创业者应该有的5个正常心态(转)
查看>>
php模式设计之 注册树模式
查看>>
【Android UI设计与开发】3.引导界面(三)实现应用程序只启动一次引导界面
查看>>
_ENV和_G
查看>>
别做操之过急的”无效将军”,做实实在在的”日拱一卒” 纵使一年不将军,不可一日不拱卒...
查看>>
Oracle Grid Infrastructure: Understanding Split-Brain Node Eviction (文档 ID 1546004.1)
查看>>
Linux改变进程优先级的nice命令
查看>>
**16.app后端如何保证通讯安全--url签名
查看>>
win32窗口机制之CreateWindow
查看>>
C/C++ 一段代码区分数组指针|指针数组|函数指针|函数指针数组
查看>>
awakeFromNib小总结
查看>>
java知识大全积累篇
查看>>
善于总结所做所学的内容
查看>>
Lua-简洁、轻量、可扩展的脚本语言
查看>>
org.hibernate.MappingException: entity class not found hbm可以解析,但是实体类不能解析...
查看>>