如何看待 Rust 这门语言?

Views :
Update time : 2025-06-21 23:15:16

最近学习了一个特别有意思的 rust 库,叫 secrecy 。

这个库非常简单,简单说,就是一个 wr***er,例如 // configuration.rs use secrecy::Secret; #[derive(serde::Deserialize)] pub struct Settings { pub password: Secret, }这个类型默认故意不实现 std::fmt::Display。

所以,如果你要用一个属性,需要显示声明,例如如果需要使用这个 setting 的 password // configuration.rs use secrecy::ExposeSecret; impl Sett…。

如何看待 Rust 这门语言?
Related News
Read More >>
Blog Post With Youtube Video 以前的日漫都这大胆的吗?
2025-06-21 19:15:16
以前的日漫都这大胆的吗?...
Blog Post With Youtube Video 如何看待日本小学校园餐只有一小块鸡肉?
2025-06-21 19:15:16
如何看待日本小学校园餐只有一小块鸡肉?...
Blog Post With Youtube Video 我国的军工能力可以实现一天5000枚火箭弹连着炸三个月吗?
2025-06-21 19:20:16
我国的军工能力可以实现一天5000枚火箭弹连着炸三个月吗?...
Blog Post With Youtube Video 开战斗机从上海到北京要多久,那是一种什么样的体验?
2025-06-21 18:50:17
开战斗机从上海到北京要多久,那是一种什么样的体验?...

Leave Your Message