boytacean_encoding/
codec.rs

1use boytacean_common::error::Error;
2
3pub trait Codec {
4    type EncodeOptions;
5    type DecodeOptions;
6
7    fn encode(data: &[u8], options: &Self::EncodeOptions) -> Result<Vec<u8>, Error>;
8    fn decode(data: &[u8], options: &Self::DecodeOptions) -> Result<Vec<u8>, Error>;
9}