1use crate::{index_path::IndexPathState, Indexer, Value};
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum Error {
6 #[error("could not convert `{0:?}` to a map")]
7 CouldNotConvertToMap(Value),
8
9 #[error("could not append (`{0:?}`, `{1:?}`, `{2:?}`)")]
10 CouldNotAppend(Value, Option<Indexer>, Value),
11
12 #[error("parsing indexer ran into `{0:?}` in state `{1:?}` when parsing `{2:?}`")]
13 CouldNotParseIndexer(Option<char>, IndexPathState, String),
14}
15
16pub type Result<T> = std::result::Result<T, Error>;