law_encoder/
errors.rs

1use core::fmt;
2
3#[derive(Debug)]
4pub enum EncodeError {
5    OutputBufferTooSmall,
6}
7
8impl fmt::Display for EncodeError {
9    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10        match self {
11            EncodeError::OutputBufferTooSmall => write!(
12                f,
13                "Output buffer is too small. Must be at least 1/2 of input size."
14            ),
15        }
16    }
17}