摘要:
Define a macro and use it: macro_rules! my_macro { () => { println!("Check out my macro!"); }; } fn main() { my_macro!(); } Notice that you have time 阅读全文
posted @ 2024-02-27 15:23
Zhentiw
阅读(11)
评论(0)
推荐(0)
摘要:
Methods: mod sausage_factory { // private method fn get_secret_recipe() -> String { String::from("Ginger") } // public method pub fn make_sausage() { 阅读全文
posted @ 2024-02-27 14:51
Zhentiw
阅读(13)
评论(0)
推荐(0)

浙公网安备 33010602011771号