← 返回起始笔记位置

知识卡片

普通读书笔记卡 · 6991.r.4.u.1.c.1.b · 生成模型:未记录

Cargo声明依赖特性

理解等级:初级

清单的 [dependencies] 列出直接依赖和版本约束,Cargo 解析间接依赖。依赖还可声明可选功能,例如启用 Serde 的 derive 以使用派生。查找缺失的派生宏时,检查依赖条目的功能选项和导入。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《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