摘要:
trait Bird { fn fly(&self); } struct Duck{x:i32} struct Swan{x:i64} impl Bird for Duck { fn fly(&self) { println!("duck duck"); } } impl Bird for Swan 阅读全文
posted @ 2020-03-24 22:54 liufu627 阅读(1203) 评论(0) 推荐(0)
摘要:
trait Bird { fn fly(&self); } struct Duck{x:i32} struct Swan{x:i64} impl Bird for Duck { fn fly(&self) { println!("duck duck"); } } impl Bird for Swan 阅读全文
posted @ 2020-03-24 22:54 liufu627 阅读(1203) 评论(0) 推荐(0)
摘要:
# Rust异步网络编程 Rust的高性能异步网络编程模式目前是基于mio和futures这两个库构建的生态。 Tokio则连接这2个库构建了一个异步非阻塞事件驱动编程平台。 # 什么是 mio,futures,tokio ## 1- Mio Mio是Rust的轻量级快速低级IO库,专注于非阻塞AP 阅读全文
posted @ 2020-03-24 22:29 liufu627 阅读(2074) 评论(0) 推荐(0) |
||