2个不稳定版本
| 0.2.0 | 2021年11月13日 |
|---|---|
| 0.1.0 | 2021年11月5日 |
#11 in #deal
每月258次下载
9KB
117 代码行
io_ext
扩展标准库中的Read和Write特质,以简化原始类型的工作。
用法
fn main() {
use io_ext::ReadExt;
let data = b"\x00\x02\x03\x00";
let mut slice = &data[..];
assert_eq!(slice.read_u16_be(), 2);
assert_eq!(slice.read_u16_le(), 3);
}
lib.rs:
io_ext提供处理来自std::io::Read和std::io::Write的方法
依赖关系
~4KB