1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* @Author: lxt
* @Date: 2022-09-15 13:07:35
* @LastEditors: [lxt]
* @LastEditTime: 2022-09-15 15:51:31
* @Description: // #
*/
// cargo build 执行 dev profile
// cargo build --release 执行 release profile
// 自定义 profile:
// 1.在 Cargo.toml 中加 [profile.xxx] 域,覆盖子集;
// [profile.dev]
// opt-level=0 # 编译时执行哪种程度的优化 0~3 越大编译时间越长
// 2./// 用于生成文档注释,可以写 Markdown 语法,最后是 html,放置在说明条目之前,使用 cargo doc --open 生成文档(target/doc);
// 注释文档可能会用到:Examples、Panics、Errors、Safety(unsafe 原因)
// 运行 cargo test 时(或者 cargo test --doc),文档注释的代码块会被当做测试用例执行
// 3.//! 描述外层注释,一般加载 lib.rs 中
// 4.pub use 可以重新导出,创建一个与内部私有结构不同的对外公关结构,
// 5.发布:cargo login 输入 api token,保存在本地 ~/.cargo/credentials 下;cargo publish 发布;
//! # Code
//! Code is a demo
//! ha ha ha ha
//!
/// Add one to the number given
///
/// # Examples
///
/// ```
/// let arg = 5;
/// let answer = evan_toy::add_one(arg);
/// assert_eq!(6,answer);
/// ```
pub use PrimaryColor;
pub use SecondaryColor;
pub use mix;