随笔分类 -  Rust

rust program piece
摘要:cargo toml [package] name = "serialports" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/ 阅读全文
posted @ 2022-01-05 18:53 iwetuan 阅读(466) 评论(0) 推荐(0)
摘要:工厂模式rust 阅读全文
posted @ 2021-12-30 14:03 iwetuan 阅读(205) 评论(0) 推荐(0)
摘要:Rust实现打印变量的的类型名 use std::fmt::{Debug}; #[derive(Debug)] enum Unit{ P1,P2 } //实行trait bound fn type_v<T>(t:T) where T:Debug { println!("{:?},{}",t,core 阅读全文
posted @ 2021-10-10 14:09 iwetuan 阅读(498) 评论(0) 推荐(0)