serde_bytes_ng 0.1.2

Optimized handling of `[u8; N]`, `&[u8]` and `Vec<u8>` for Serde
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![allow(clippy::needless_pass_by_value)]

use serde_bytes_ng::{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"..."
}