use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("index out of bounds: {0}")]
IndexOutOfBounds(usize),
#[error("invalid selection: rank {0} not found")]
InvalidSelection(usize),
#[error("io error: {0}")]
Io(#[from] std::io::Error),
#[error("invalid encoding: {0}")]
InvalidEncoding(String),
}
pub type Result<T> = std::result::Result<T, Error>;