feat: add bytes

This commit is contained in:
2021-03-21 20:46:27 +08:00
parent 67f62ee869
commit dceda46ae8
3 changed files with 34 additions and 0 deletions

9
__misc/bytes/src/main.rs Normal file
View File

@@ -0,0 +1,9 @@
use bytes::{BytesMut, BufMut};
fn main() {
let mut buf = BytesMut::new();
buf.put_u8(0x20);
buf.put(&b"hello world"[..]);
println!("{:?}", buf);
}