From bf7aa7b1350a12527c61cde0d8c0b70f28fa96d2 Mon Sep 17 00:00:00 2001 From: sunface Date: Wed, 1 Dec 2021 16:45:06 +0800 Subject: [PATCH] update catalog according to philosophy --- src/SUMMARY.md | 85 +++++++++++++++++++-------- src/cargo/build-js.md | 1 + src/cargo/dependency-override.md | 1 + src/cargo/feature.md | 1 + src/cargo/version.md | 1 + src/errors/intro.md | 1 + src/errors/panic.md | 1 + src/errors/pretty-format.md | 1 + src/errors/result.md | 1 + src/errors/user-define.md | 1 + src/monitor/apm.md | 1 + src/monitor/intro.md | 1 + src/monitor/log.md | 1 + src/monitor/observability | 1 + src/object-oriented/design-pattern.md | 1 + src/object-oriented/trait-object.md | 1 + src/test/benchmark.md | 1 + src/test/ci.md | 1 + src/test/intergration.md | 1 + src/test/intro.md | 1 + src/test/unit.md | 1 + src/traits/as-ref-as-mut.md | 1 + src/traits/borrow-family.md | 1 + src/traits/cow.md | 1 + src/traits/deref.md | 1 + src/traits/from-into.md | 1 + src/traits/intro.md | 1 + src/unsafe/ffi.md | 1 + src/unsafe/modify-global-var.md | 1 + 29 files changed, 87 insertions(+), 26 deletions(-) create mode 100644 src/cargo/build-js.md create mode 100644 src/cargo/dependency-override.md create mode 100644 src/cargo/feature.md create mode 100644 src/cargo/version.md create mode 100644 src/errors/intro.md create mode 100644 src/errors/panic.md create mode 100644 src/errors/pretty-format.md create mode 100644 src/errors/result.md create mode 100644 src/errors/user-define.md create mode 100644 src/monitor/apm.md create mode 100644 src/monitor/intro.md create mode 100644 src/monitor/log.md create mode 100644 src/monitor/observability create mode 100644 src/object-oriented/design-pattern.md create mode 100644 src/object-oriented/trait-object.md create mode 100644 src/test/benchmark.md create mode 100644 src/test/ci.md create mode 100644 src/test/intergration.md create mode 100644 src/test/intro.md create mode 100644 src/test/unit.md create mode 100644 src/traits/as-ref-as-mut.md create mode 100644 src/traits/borrow-family.md create mode 100644 src/traits/cow.md create mode 100644 src/traits/deref.md create mode 100644 src/traits/from-into.md create mode 100644 src/traits/intro.md create mode 100644 src/unsafe/ffi.md create mode 100644 src/unsafe/modify-global-var.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index e456670e..3e71a7fc 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -42,24 +42,49 @@ ## 专题内容,每个专题都配套一个小型项目进行实践 + +- [错误处理](errors/intro.md) + - [panic!](errors/panic.md) + - [适用Result返回错误](errors/result.md) + - [自定义错误](errors/user-define.md) + - [让错误输出更优雅](errors/pretty-format.md) + +- [Cargo详解](cargo/intro.md) + - [常用命令](cargo/commands.md) + - [项目结构](cargo/layout.md) + - [Cargo.toml和Cargo.lock](cargo/cargo-toml-lock.md) + - [构建缓存](cargo/cache.md) + - [版本管理](cargo/version.md) + - [依赖覆盖](cargo/dependency-override.md) + - [工作空间](cargo/workspace.md) + - [条件编译、条件依赖](cargo/feature.md) + - [配置参数(todo)](cargo/manifest.md) + - [自定义构建脚本](cargo/build-js.md) + +- [测试](test/intro.md) + - [单元测试](test/unit.md) + - [集成测试](test/intergration.md) + - [性能测试](test/benchmark.md) + - [持续集成](test/ci.md) + +- [日志和监控](monitor/intro.md) + - [日志](monitor/log.md) + - [可观测性](monitor/observability) + - [监控(APM)](monitor/apm.md) + - [智能指针](smart-pointer/intro.md) - [Box对象(todo)](smart-pointer/box.md) - [Deref和Drop特征(todo)](smart-pointer/deref-drop.md) - [Rc与RefCell(todo)](smart-pointer/rc-refcell.md) - [自引用与内存泄漏(todo)](smart-pointer/self-referrence.md) -- [深入内存](memory/intro.md) - - [指针和引用(todo)](memory/pointer-ref.md) - - [未初始化内存(todo)](memory/uninit.md) - - [内存分配(todo)](memory/allocation.md) - - [内存布局(todo)](memory/layout.md) - - [虚拟内存(todo)](memory/virtual.md) - -- [对抗编译检查](fight-with-compiler/intro.md) - - [幽灵数据(todo)](fight-with-compiler/phantom-data.md) - - [生命周期(todo)](fight-with-compiler/lifetime.md) - - [类型未限制(todo)](fight-with-compiler/unconstrained.md) - +- [常见特征解析](traits/intro.md) + - [类型转换From/Into](traits/from-into.md) + - [AsRef, AsMut](traits/as-ref-as-mut.md) + - [Borrow, BorrowMut, ToOwned](traits/borrow-family.md) + - [Deref和引用隐式转换](traits/deref.md) + - [写时拷贝Cow](traits/cow.md) + - [多线程](multi-threads/intro.md) - [线程管理(todo)](multi-threads/thread.md) - [消息传递(todo)](multi-threads/message-passing.md) @@ -67,6 +92,13 @@ - [数据竞争(todo)](multi-threads/races.md) - [Send、Sync(todo)](multi-threads/send-sync.md) +- [深入内存](memory/intro.md) + - [指针和引用(todo)](memory/pointer-ref.md) + - [未初始化内存(todo)](memory/uninit.md) + - [内存分配(todo)](memory/allocation.md) + - [内存布局(todo)](memory/layout.md) + - [虚拟内存(todo)](memory/virtual.md) + - [网络和异步编程](networking/intro.md) - [TCP和网络原理(todo)](networking/tcp.md) - [并发与并行(todo)](networking/concurrency-parallelism.md) @@ -90,26 +122,27 @@ - [代码风格(todo)](style-guide/code.md) - [面向对象](object-oriented/intro.md) - - [OO所需的特性(todo)](object-oriented/characteristics.md) + - [为何OO(todo)](object-oriented/characteristics.md) + - [特征对象](object-oriented/trait-object.md) + - [设计模式](object-oriented/design-pattern.md) -- [Cargo详解](cargo/intro.md) - - [常用命令](cargo/commands.md) - - [项目结构](cargo/layout.md) - - [Cargo.toml和Cargo.lock](cargo/cargo-toml-lock.md) - - [构建缓存](cargo/cache.md) - - [工作空间](cargo/workspace.md) - - [配置参数(todo)](cargo/manifest.md) +- [不安全Rust](unsafe/intro.md) + - [原生指针(todo)](unsafe/raw-pointer.md) + - [修改全局变量](unsafe/modify-global-var.md) + - [FFI外部语言用](unsafe/ffi.md) + +- [对抗编译检查](fight-with-compiler/intro.md) + - [幽灵数据(todo)](fight-with-compiler/phantom-data.md) + - [生命周期(todo)](fight-with-compiler/lifetime.md) + - [类型未限制(todo)](fight-with-compiler/unconstrained.md) + +- [宏编程](macro/intro.md) + - [过程宏(todo)](macro/procedure-macro.md) - [性能调优](performance/intro.md) - [Benchmark性能测试(todo)](performance/benchmark.md) - [减少Runtime check(todo)](performance/runtime-check.md) -- [Unsafe](unsafe/intro.md) - - [原始指针(todo)](unsafe/raw-pointer.md) - -- [宏编程](macro/intro.md) - - [过程宏(todo)](macro/procedure-macro.md) - - [常用三方库](libraries/intro.md) - [JSON](libraries/json/intro.md) - [serde(todo)](libraries/json/serde.md) diff --git a/src/cargo/build-js.md b/src/cargo/build-js.md new file mode 100644 index 00000000..f24e5a30 --- /dev/null +++ b/src/cargo/build-js.md @@ -0,0 +1 @@ +# 自定义构建脚本 diff --git a/src/cargo/dependency-override.md b/src/cargo/dependency-override.md new file mode 100644 index 00000000..05831572 --- /dev/null +++ b/src/cargo/dependency-override.md @@ -0,0 +1 @@ +# 依赖覆盖 diff --git a/src/cargo/feature.md b/src/cargo/feature.md new file mode 100644 index 00000000..62b101a5 --- /dev/null +++ b/src/cargo/feature.md @@ -0,0 +1 @@ +# 条件编译、条件依赖 diff --git a/src/cargo/version.md b/src/cargo/version.md new file mode 100644 index 00000000..c1214025 --- /dev/null +++ b/src/cargo/version.md @@ -0,0 +1 @@ +# 版本管理 diff --git a/src/errors/intro.md b/src/errors/intro.md new file mode 100644 index 00000000..a27f18e2 --- /dev/null +++ b/src/errors/intro.md @@ -0,0 +1 @@ +# 错误处理 diff --git a/src/errors/panic.md b/src/errors/panic.md new file mode 100644 index 00000000..b82dd9af --- /dev/null +++ b/src/errors/panic.md @@ -0,0 +1 @@ +# panic! diff --git a/src/errors/pretty-format.md b/src/errors/pretty-format.md new file mode 100644 index 00000000..5020fa72 --- /dev/null +++ b/src/errors/pretty-format.md @@ -0,0 +1 @@ +# 让错误展示更优雅 diff --git a/src/errors/result.md b/src/errors/result.md new file mode 100644 index 00000000..63d7e7cc --- /dev/null +++ b/src/errors/result.md @@ -0,0 +1 @@ +# 适用Result返回错误 diff --git a/src/errors/user-define.md b/src/errors/user-define.md new file mode 100644 index 00000000..b691927e --- /dev/null +++ b/src/errors/user-define.md @@ -0,0 +1 @@ +# 自定义错误 diff --git a/src/monitor/apm.md b/src/monitor/apm.md new file mode 100644 index 00000000..d55a9088 --- /dev/null +++ b/src/monitor/apm.md @@ -0,0 +1 @@ +# 监控(APM) diff --git a/src/monitor/intro.md b/src/monitor/intro.md new file mode 100644 index 00000000..877a07cf --- /dev/null +++ b/src/monitor/intro.md @@ -0,0 +1 @@ +# 日志和监控 diff --git a/src/monitor/log.md b/src/monitor/log.md new file mode 100644 index 00000000..65c2dbdd --- /dev/null +++ b/src/monitor/log.md @@ -0,0 +1 @@ +# 日志 diff --git a/src/monitor/observability b/src/monitor/observability new file mode 100644 index 00000000..f4698433 --- /dev/null +++ b/src/monitor/observability @@ -0,0 +1 @@ +# 可观测性 diff --git a/src/object-oriented/design-pattern.md b/src/object-oriented/design-pattern.md new file mode 100644 index 00000000..da2e870b --- /dev/null +++ b/src/object-oriented/design-pattern.md @@ -0,0 +1 @@ +# 设计模式 diff --git a/src/object-oriented/trait-object.md b/src/object-oriented/trait-object.md new file mode 100644 index 00000000..0dc4a85c --- /dev/null +++ b/src/object-oriented/trait-object.md @@ -0,0 +1 @@ +# 特征对象 diff --git a/src/test/benchmark.md b/src/test/benchmark.md new file mode 100644 index 00000000..a7e30ab9 --- /dev/null +++ b/src/test/benchmark.md @@ -0,0 +1 @@ +# 性能测试 diff --git a/src/test/ci.md b/src/test/ci.md new file mode 100644 index 00000000..1ef1bada --- /dev/null +++ b/src/test/ci.md @@ -0,0 +1 @@ +# 持续集成 diff --git a/src/test/intergration.md b/src/test/intergration.md new file mode 100644 index 00000000..ec7352e7 --- /dev/null +++ b/src/test/intergration.md @@ -0,0 +1 @@ +# 集成测试 diff --git a/src/test/intro.md b/src/test/intro.md new file mode 100644 index 00000000..0961fd66 --- /dev/null +++ b/src/test/intro.md @@ -0,0 +1 @@ +# 测试 diff --git a/src/test/unit.md b/src/test/unit.md new file mode 100644 index 00000000..2fd14410 --- /dev/null +++ b/src/test/unit.md @@ -0,0 +1 @@ +# 单元测试 diff --git a/src/traits/as-ref-as-mut.md b/src/traits/as-ref-as-mut.md new file mode 100644 index 00000000..17e0ce09 --- /dev/null +++ b/src/traits/as-ref-as-mut.md @@ -0,0 +1 @@ +# AsRef, AsMut diff --git a/src/traits/borrow-family.md b/src/traits/borrow-family.md new file mode 100644 index 00000000..f7645356 --- /dev/null +++ b/src/traits/borrow-family.md @@ -0,0 +1 @@ +# Borrow, BorrowMut, ToOwned diff --git a/src/traits/cow.md b/src/traits/cow.md new file mode 100644 index 00000000..b20af65f --- /dev/null +++ b/src/traits/cow.md @@ -0,0 +1 @@ +# 写时拷贝Cow diff --git a/src/traits/deref.md b/src/traits/deref.md new file mode 100644 index 00000000..522c6414 --- /dev/null +++ b/src/traits/deref.md @@ -0,0 +1 @@ +# Deref和引用隐式转换 diff --git a/src/traits/from-into.md b/src/traits/from-into.md new file mode 100644 index 00000000..3741fe04 --- /dev/null +++ b/src/traits/from-into.md @@ -0,0 +1 @@ +# 类型转换From/Into diff --git a/src/traits/intro.md b/src/traits/intro.md new file mode 100644 index 00000000..d2468fd7 --- /dev/null +++ b/src/traits/intro.md @@ -0,0 +1 @@ +# 常见特征解析 diff --git a/src/unsafe/ffi.md b/src/unsafe/ffi.md new file mode 100644 index 00000000..7dc9aa29 --- /dev/null +++ b/src/unsafe/ffi.md @@ -0,0 +1 @@ +# FFI外部语言用 diff --git a/src/unsafe/modify-global-var.md b/src/unsafe/modify-global-var.md new file mode 100644 index 00000000..edfe9340 --- /dev/null +++ b/src/unsafe/modify-global-var.md @@ -0,0 +1 @@ +# 修改全局变量