导航

随笔分类 -  RUST

摘要:#[cfg(debug_assertions)] macro_rules! debug { () => (std::println!()); ($($arg:tt)*) => ({ println!($($arg)*); }) } #[cfg(not(debug_assertions))] macr 阅读全文

posted @ 2021-02-10 15:19 DotNet1010 阅读(1000) 评论(0) 推荐(0)

摘要:https://dev.to/cad97/rust-must-know-crates-5ad8 https://dev.to/search?q=100DayOfRust https://fasterthanli.me/tags/rust 阅读全文

posted @ 2021-02-10 10:01 DotNet1010 阅读(57) 评论(0) 推荐(0)

摘要:https://lborb.github.io/book/title-page.html https://blog.logrocket.com/unsafe-rust-how-and-when-not-to-use-it/ 阅读全文

posted @ 2021-01-28 08:42 DotNet1010 阅读(73) 评论(0) 推荐(0)

摘要:https://crates.io/crates/typed-builder typed-builder = "0.5.1" Rust Typed Builder Creates a compile-time verified builder: #[macro_use] extern crate t 阅读全文

posted @ 2020-03-12 13:32 DotNet1010 阅读(390) 评论(0) 推荐(0)

摘要:#[allow(unused_macros)] macro_rules! unless { ($arg:expr,$branch:expr) => { if !$arg {$branch}; }; } fn main() { println!("Hello, world!"); unless!(2> 阅读全文

posted @ 2019-07-15 16:35 DotNet1010 阅读(278) 评论(0) 推荐(0)