uplc_turbo/flat/encode/error.rs
1use std::convert::Infallible;
2
3use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum FlatEncodeError {
7 #[error("Overflow detected, cannot fit {byte} in {num_bits} bits.")]
8 Overflow { byte: u8, num_bits: usize },
9 #[error("Buffer is not byte aligned")]
10 BufferNotByteAligned,
11 #[error("Cannot encode BLS12-381 constants")]
12 BlsElementNotSupported,
13 #[error(transparent)]
14 EncodeCbor(#[from] minicbor::encode::Error<Infallible>),
15}