1use quick_error::quick_error;
2
3#[derive(Debug)]
4#[doc(hidden)]
5pub struct EncodingErrorDetail; // maybe later
6
7quick_error! {
8 /// Failures enum
9 #[derive(Debug)]
10 #[non_exhaustive]
11 pub enum Error {
12 /// Slices given to `encode_raw_planes` must be `width * height` large.
13 TooFewPixels {
14 display("Provided buffer is smaller than width * height")
15 }
16 Unsupported(msg: &'static str) {
17 display("Not supported: {}", msg)
18 }
19 EncodingError(e: EncodingErrorDetail) {
20 display("Encoding error reported by rav1e")
21 from(_e: rav1e::InvalidConfig) -> (EncodingErrorDetail)
22 from(_e: rav1e::EncoderStatus) -> (EncodingErrorDetail)
23 }
24 }
25}
26