Update ch19-00-advanced-features.md

pull/55/head
Zheng Ping 7 years ago committed by GitHub
parent 5f0e995924
commit 1c147ee485

@ -1,17 +1,14 @@
# 高级特性
我们已经走了很长的路! 现在我们已经学了使用Rust时99%的需要学习的内容. 在我们做第20章中的项目之前, 让我们来谈谈你可能会遇到的最后的1%的问题. 你可以随便跳过本章, 当你在实作中遇到这些问题时再回过头来学习也无妨; 我们将学习的在这里列出的特性在某些特定的情况下非常有用. 我们不想舍弃这些特性, 但你用到它们的时候确实不多.
我们已经走得很远了! 现在我们已经学了使用Rust时99%的需要学习的内容. 在我们做第20章中的项目之前, 让我们来谈谈你可能会遇到的最后的1%的问题. 你可以随便跳过本章, 当你在实作中遇到这些问题时再回过头来学习也无妨; 我们将学习的在这里列出的特性在某些特定的情况下非常有用. 我们不想舍弃这些特性, 但你用到它们的时候确实不多.
本章将覆盖如下内容:
* Unsafe Rust: for when you need to opt out of some of Rust's guarantees and
tell the compiler that you will be responsible for upholding the guarantees
instead
* Advanced Lifetimes: Additional lifetime syntax for complex situations
* Advanced Traits: Associated Types, default type parameters, fully qualified
syntax, supertraits, and the newtype pattern in relation to traits
* Advanced Types: some more about the newtype pattern, type aliases, the
"never" type, and dynamically sized types
* Advanced Functions and Closures: function pointers and returning closures
* Unsafe Rust: 用于当你需要弃用Rust的某些保证时你告诉编译器你将负责维护某些保证
* 高级生命周期: 应对复杂情况的额外的生命周期语法
* 高级Traits: 关联类型, 默认类型参数, 完全合格的句法(fully qualified
syntax), 超级trait(supertraits), 和与trait关联的新类型模式
* 高级类型: 关于newtype模式、类型别名、"never"类型和动态sized类型的高级话题
* 高级函数和闭包: 函数指针和返回闭包
It's a panoply of Rust features with something for everyone! Let's dive in!
对所有人而言, 这都是一个介绍Rust迷人特性的宝典! 让我们走进去吧!

Loading…
Cancel
Save