摘要: 1. Rust的特征与泛型 1.1 先上特征代码: use std::boxed::Box; // 定义一个特征 pub trait Animal{ fn bark(&self); } pub struct Dog{ pub name: String, } pub struct Chicken{ p 阅读全文
posted @ 2020-08-16 14:12 编号94530 阅读(300) 评论(0) 推荐(0) 编辑