barse 0.3.0

Binary parsing library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::{error::Error, ByteRead, FromByteReader, Result};

impl<'input, const COUNT: usize> FromByteReader<'input> for [u8; COUNT] {
    type Err = Error;
    fn from_byte_reader<R>(mut reader: R) -> Result<Self, Self::Err>
    where
        R: ByteRead<'input>,
    {
        reader.read::<COUNT>()
    }
}