[rust学习] 二、 rust中的智能指针

rust中智能指针大致分类 以下内容提炼自rust官方文档: https://doc.rust-lang.org/book/ch15-01-box.html 一、 Box<T> 1. 使用例子: 1 fn main() { 2 let b = Box::new(5); 3 println!("b =
posted @ 2023-04-04 20:19  朝花不夕拾  阅读(68)  评论(0编辑  收藏  举报