合集-rust

摘要:use std::collections::HashMap; use std::sync::OnceLock; const B64: [char; 65] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N' 阅读全文
posted @ 2024-10-22 14:24 念秋 阅读(280) 评论(0) 推荐(0)
摘要:前提知识: rust里面有move,copy,clone。 所有对象都有一个类型,具体所有权。 比如 #[derive(Debug)] struct Complex { real: f64, imag: f64, } fn main() { let a = Complex{real:1.,imag: 阅读全文
posted @ 2024-12-27 15:17 念秋 阅读(59) 评论(0) 推荐(0)