cs_serde_bytes 0.12.2

Optimized handling of `&[u8]` and `Vec<u8>` for Serde
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use cs_serde_bytes::{ByteBuf, Bytes};

fn _bytes_eq_slice(bytes: &Bytes, slice: &[u8]) -> bool {
    bytes == slice
}

fn _bytebuf_eq_vec(bytebuf: ByteBuf, vec: Vec<u8>) -> bool {
    bytebuf == vec
}

fn _bytes_eq_bytestring(bytes: &Bytes) -> bool {
    bytes == b"..."
}