binn_rs/
error.rs

1pub type Result<T> = core::result::Result<T, Error>;
2
3/// Error that might occur when using binn values
4#[derive(Debug)]
5pub enum Error {
6    /// Attempted to insert value with key longer than 255 bytes
7    LongKey,
8
9    /// Given byte buffer was malformed and couldn't be parsed
10    Malformed,
11
12    /// Container was read only and cannot be modified
13    ReadOnly,
14
15    /// Indicates that static buffer was not big enough and contains
16    /// how many extra bytes are needed
17    SmallBuffer(usize),
18}
19
20#[derive(Debug)]
21pub struct OutOfRangeError;