Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 0 additions & 118 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,124 +32,6 @@ blog: https://rust-china.org/

wiki: https://wiki.rust-china.org/

## 大纲

* [初识Rust](1st-glance/README.md)「daogangtang, tiansiyuan」
* [安装Rust](install/preface.md)「marvin-min」
* [Linux](install/install_rust_on_linux.md)
* [Mac](install/install_rust_on_mac_os.md)
* [Windows](install/install_rust_on_windows.md)
* [版本管理工具: multirust](install/multirust.md)
* [编辑器](editors/preface.md)
* [前期准备](editors/before.md)「wayslog」
* [vim](editors/vim.md)「wayslog」
* [emacs](editors/emacs.md)「tiansiyuan」
* [vscode](editors/vscode.md)「daogangtang」
* [atom](editors/atom.md)「wayslog」
* [sublime](editors/sublime.md)「domty」
* [visual studio](editors/visualstudio.md)「marvinguo」
* [spacemacs](editors/spacemacs.md)「wayslog」
* [Rust快速入门](quickstart/quickstart.md)「Naupio」
* [Rust旅程](quickstart/rust-travel.md)
* [基础类型](quickstart/primitive-type.md)
* [向量与字符串](quickstart/vector-string.md)
* [结构体与枚举](quickstart/struct-enum.md)
* [操作流](quickstart/control-flow.md)
* [函数与方法](quickstart/function-method.md)
* [特性](quickstart/trait.md)
* [注释与文档](quickstart/comments-document.md)
* [输入输出流](quickstart/io-stream.md)
* [Cargo项目管理器](cargo-projects-manager/cargo-projects-manager.md)「fuyingfuying」
* [基本程序结构](flow/preface.md)「daogangtang」
* [注释](flow/comment.md)
* [条件](flow/condition.md)
* [循环](flow/repetition.md)
* [类型、运算符和字符串](type/preface.md)「wayslog」
* [基础类型](type/types.md)
* [复合类型](type/compound-types.md)
* [字符串类](type/string.md)
* [基础运算符和字符串格式化](type/operator-and-formatting.md)
* [函数](function/overview.md)「qdao」
* [函数参数](function/arguement.md)
* [函数返回值](function/return_value.md)
* [语句和表达式](function/statement_expression.md)
* [高阶函数](function/higher_order_function.md)
* [模式匹配](match/overview.md)「wayslog」
* [match关键字](match/match.md)
* [模式](match/pattern.md)
* [Trait(特征)](trait/overview.md)「JohnSmithX」
* [trait关键字](trait/trait.md)
* [trait对象](trait/trait-object.md)
* [泛型](generic/generic.md)「stormgbs」
* [可变性、所有权、租借和生命期](ownership-system/ownership_system.md)「stormgbs」
* [所有权](ownership-system/ownership.md)
* [引用和借用](ownership-system/borrowing_reference.md)
* [生命周期](ownership-system/lifetime.md)
* [闭包](closure/overview.md)「qdao」
* [闭包的语法](closure/syntax.md)
* [闭包的实现](closure/implementation.md)
* [闭包作为参数和返回值](closure/as_argument_return_value.md)
* [集合类型](collections/overview.md)「wayslog」
* [动态数组](collections/vec.md)
* [哈希表](collections/hashmap.md)
* [迭代器](iterator/overview.md)「wayslog」
* [迭代器、适配器、消费者](iterator/iterator.md)
* [模块和包系统、Prelude](module/preface.md)「daogangtang」
* [模块(module)和包(crate)](module/module.md)
* [Prelude](module/prelude.md)
* [Option、Result与错误处理](error-handling/option-result.md)「JohnSmithX」
* [宏系统](macro/macro.md)「tennix」
* [堆、栈与Box](heap-stack/heap-stack.md)「tennix」
* [几种智能指针](rcarc/preface.md)「daogangtang」
* [Rc, Arc](rcarc/rcarc.md)
* [Mutex, RwLock](rcarc/mutex.md)
* [Cell, RefCell](rcarc/cell.md)
* [类型系统中的几个常见 Trait](intoborrow/preface.md) 「daogangtang」
* [Into/From 及其在 String 和 &str 互转上的应用](intoborrow/into.md)
* [AsRef, AsMut](intoborrow/asref.md)
* [Borrow, BorrowMut, ToOwned](intoborrow/borrow.md)
* [Deref 与 Deref coercions](intoborrow/deref.md)
* [Cow 及其在 String 和 &str 上的应用](intoborrow/cow.md)
* [Send 和 Sync](marker/sendsync.md)「daogangtang」
* [并发,并行,多线程编程](concurrency-parallel-thread/preface.md)「anzhihun」
* [线程](concurrency-parallel-thread/thread.md)
* [消息传递](concurrency-parallel-thread/message-passing.md)
* [共享内存](concurrency-parallel-thread/share-memory.md)
* [同步](concurrency-parallel-thread/synchronize.md)
* [并行](concurrency-parallel-thread/parallel.md)
* [Unsafe、原始指针](unsafe-rawpointer/preface.md)「JohnSmithX」
* [Unsafe](unsafe-rawpointer/unsafe.md)
* [原始指针](unsafe-rawpointer/raw-pointer.md)
* [FFI](ffi/preface.md)「42」
* [rust调用ffi函数](ffi/calling-ffi-function.md)
* [将rust编译成库](ffi/compiling-rust-to-lib.md)
* [运算符重载](operator-overloading/operator.md)「wayslog」
* [属性和编译器参数](attr-and-compiler-arg/preface.md)「elton」
* [属性](attr-and-compiler-arg/attribute.md)
* [编译器参数](attr-and-compiler-arg/rustc-option.md)
* [Cargo参数配置](cargo-detailed-cfg/cargo-detailed-cfg.md)「fuyingfuying」
* [测试与评测](testing/preface.md)「daogangtang」
* [测试](testing/threearchtest.md)
* [评测](testing/bench.md)
* [代码风格](coding-style/style.md)「tiansiyuan」
* [Any与反射](any/any.md)「wayslog」
* [安全(safe)](safe/safe.md)「daogangtang」
* [常用数据结构实现](data-structure/preface.md)「Naupio」
* [栈结构](data-structure/stack.md)
* [队列](data-structure/queue.md)
* [优先队列](data-structure/priority_queue.md)
* [二叉树](data-structure/binary_tree.md)
* [链表](data-structure/linked_list.md)
* [图结构](data-structure/graph.md)
* [标准库介绍](std/overview.md)「wayslog」
* [系统命令:调用grep](std/process.md)
* [目录操作:简单grep](std/fs-and-path.md)
* [网络模块:W回音](std/net.md)
* [实战篇](action/preface.md)「wangyu190810」
* [实战:Json处理](action/json_data/readme.md)
* [实战:Web 应用开发入门](action/mysite/readme.md)
* [实战:使用Postgresql数据库](action/db/readme.md)

## 版权规定

本书使用 `CC BY-SA 3.0` 协议,转载请注明地址。
Expand Down
42 changes: 21 additions & 21 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@
* [基本程序结构](flow/preface.md)「daogangtang」
* [注释](flow/comment.md)
* [条件](flow/condition.md)
* [循环](flow/repeatition.md)
* [循环](flow/repetition.md)
* [类型、运算符和字符串](type/preface.md)「wayslog」
* [基础类型](type/types.md)
* [复合类型](type/compound-types.md)
* [字符串类](type/strings.md)
* [基础运算符和字符串格式化](type/operator-and-format.md)
* [字符串类](type/string.md)
* [基础运算符和字符串格式化](type/operator-and-formatting.md)
* [函数](function/overview.md)「qdao」
* [函数参数](function/arguement.md)
* [函数返回值](function/return_value.md)
* [语句和表达式](function/statement_expression.md)
* [高阶函数](function/high_order_function.md)
* [高阶函数](function/higher_order_function.md)
* [模式匹配](match/overview.md)「wayslog」
* [match关键字](match/match.md)
* [模式](match/pattern.md)
* [Trait (特征)](trait/overview.md)「JohnSmithX」
* [trait关键字](trait/trait.md)
* [trait对象](trait/trait-object.md)
* [泛型](generics/generics.md)「stormgbs」
* [泛型](generic/generic.md)「stormgbs」
* [可变性、所有权、租借和生命期](ownership-system/ownership_system.md)「stormgbs」
* [所有权](ownership-system/ownership.md)
* [引用和借用](ownership-system/borrowing_references.md)
* [生命周期](ownership-system/lifetimes.md)
* [引用和借用](ownership-system/borrowing_reference.md)
* [生命周期](ownership-system/lifetime.md)
* [闭包](closure/overview.md)「qdao」
* [闭包的语法](closure/syntax.md)
* [闭包的实现](closure/implementation.md)
Expand All @@ -60,9 +60,9 @@
* [哈希表](collections/hashmap.md)
* [迭代器](iterator/overview.md)「wayslog」
* [迭代器、适配器、消费者](iterator/iterator.md)
* [模块和包系统、Prelude](modules/preface.md)「daogangtang」
* [模块(module)和包(crate)](modules/module.md)
* [Prelude](modules/prelude.md)
* [模块和包系统、Prelude](module/preface.md)「daogangtang」
* [模块(module)和包(crate)](module/module.md)
* [Prelude](module/prelude.md)
* [Option、Result与错误处理](error-handling/option-result.md)「JohnSmithX」
* [宏系统](macro/macro.md)「tennix」
* [堆、栈与Box](heap-stack/heap-stack.md)「tennix」
Expand All @@ -77,29 +77,29 @@
* [Deref 与 Deref coercions](intoborrow/deref.md)
* [Cow 及其在 String 和 &str 上的应用](intoborrow/cow.md)
* [Send 和 Sync](marker/sendsync.md)「daogangtang」
* [并发,并行,多线程编程](concurrency-parallel-threads/preface.md)「anzhihun」
* [线程](concurrency-parallel-threads/thread.md)
* [消息传递](concurrency-parallel-threads/message-passing.md)
* [共享内存](concurrency-parallel-threads/share-memory.md)
* [同步](concurrency-parallel-threads/synchronize.md)
* [并行](concurrency-parallel-threads/parallel.md)
* [并发,并行,多线程编程](concurrency-parallel-thread/preface.md)「anzhihun」
* [线程](concurrency-parallel-thread/thread.md)
* [消息传递](concurrency-parallel-thread/message-passing.md)
* [共享内存](concurrency-parallel-thread/share-memory.md)
* [同步](concurrency-parallel-thread/synchronize.md)
* [并行](concurrency-parallel-thread/parallel.md)
* [Unsafe、原始指针](unsafe-rawpointer/preface.md)「JohnSmithX」
* [Unsafe](unsafe-rawpointer/unsafe.md)
* [原始指针](unsafe-rawpointer/raw-pointer.md)
* [FFI](ffi/preface.md)「42」
* [rust调用ffi函数](ffi/calling-ffi-functions.md)
* [rust调用ffi函数](ffi/calling-ffi-function.md)
* [将rust编译成库](ffi/compiling-rust-to-lib.md)
* [运算符重载](operator-overloading/operator.md)「wayslog」
* [属性和编译器参数](attr-and-compiler-args/preface.md)「elton」
* [属性](attr-and-compiler-args/attributes.md)
* [编译器参数](attr-and-compiler-args/rustc-options.md)
* [属性和编译器参数](attr-and-compiler-arg/preface.md)「elton」
* [属性](attr-and-compiler-arg/attribute.md)
* [编译器参数](attr-and-compiler-arg/rustc-option.md)
* [Cargo参数配置](cargo-detailed-cfg/cargo-detailed-cfg.md)「fuyingfuying」
* [测试与评测](testing/preface.md)「daogangtang」
* [测试 (testing)](testing/threearchtest.md)
* [评测 (benchmark)](testing/bench.md)
* [代码风格](coding-style/style.md)「tiansiyuan」
* [Any与反射](any/any.md)「wayslog」
* [安全(safe)](safe/safe.md)「daogangtang」
* [安全(safe)](safe/safety.md)「daogangtang」
* [常用数据结构实现](data-structure/preface.md)「Naupio」
* [栈结构](data-structure/stack.md)
* [队列](data-structure/queue.md)
Expand Down
2 changes: 1 addition & 1 deletion function/arguement.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn say_what(name: &str, func: fn(&str)) {
func(name)
}
```
上例中,`hi`函数和`hello`函数都是只有一个`&str`类型的参数且没有返回值。而`say_what`函数则有两个参数,一个是`&str`类型,另一个则是函数类型(function type),它是只有一个`&str`类型参数且没有返回值的函数类型。关于函数类型的详细说明,请看[第4节 高阶函数](high_order_function.md)。
上例中,`hi`函数和`hello`函数都是只有一个`&str`类型的参数且没有返回值。而`say_what`函数则有两个参数,一个是`&str`类型,另一个则是函数类型(function type),它是只有一个`&str`类型参数且没有返回值的函数类型。

## 模式匹配
支持模式匹配,让rust平添了许多的灵活性,用起来也是十分的舒爽。模式匹配不仅可以用在变量声明(let语句)中,也可以用在函数参数声明中,如:
Expand Down
2 changes: 1 addition & 1 deletion function/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ fn main() {
1. [函数参数](arguement.md)
2. [函数返回值](return_value.md)
3. [语句和表达式](statement_expression.md)
4. [高阶函数](high_order_function.md)
4. [高阶函数](higher_order_function.md)

> ### 注:本章所有例子均在rustc1.4下编译通过,且例子中说明的所有的编译错误都是rustc1.4版本给出的。