use std::str::Utf8Error;
use crate::BoxType;
#[derive(Clone, Debug, thiserror::Error, PartialEq, Eq)]
pub enum Error {
#[error("Box length value {0} is reserved")]
InvalidBoxLength(u32),
#[error("Superbox box type should be 'jumb', was '{0:#?}'")]
InvalidSuperBoxType(BoxType),
#[error("Description box type should be 'jumd', was '{0:#?}'")]
InvalidDescriptionBoxType(BoxType),
#[error("Unable to decode description box as UTF-8: {0:?}")]
Utf8Error(Utf8Error),
#[error("Incomplete data, needed {0} more bytes")]
Incomplete(usize),
}