知识卡片
Cargo声明依赖特性
清单的 [dependencies] 列出直接依赖和版本约束,Cargo 解析间接依赖。依赖还可声明可选功能,例如启用 Serde 的 derive 以使用派生。查找缺失的派生宏时,检查依赖条目的功能选项和导入。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- A Tour of Rust 用类型连接表单、处理器和响应 · 查看原书依据
Crates can have optional features: parts of the interface or implementation that not all users need, but that nonetheless make sense to include
参考来源
- 位置:《Programming Rust Fast, Safe Systems Development, 3rd ed. (First Early Release)》第01章《A Tour of Rust》|用类型连接表单、处理器和响应,来源项目 `book-source`,`extracted/Programming Rust Fast, Safe Systems Development, 3rd ed. (First Early Release)/_epub-src/OEBPS/ch01.xhtml#serving-pages-to-the-web`
- 结论依据:原文介绍直接与间接依赖以及 Serde 的功能开关。
- 原始内容:Crates can have optional features: parts of the interface or implementation that not all users need, but that nonetheless make sense to include