use thiserror::Error;
pub type Result<T, E = Error> = std::result::Result<T, E>;
#[derive(Debug, Error)]
pub enum Error {
#[error(transparent)]
Reflect(#[from] facet::ReflectError),
#[error("unable to decode string: {0}")]
Encoding(#[from] crate::wire::upcode::DecodeError),
#[error("no message tag found")]
MissingTag,
#[error("message tag didn't match struct tag")]
MismatchedTag,
#[error("expected value, but input is exhausted")]
MissingValue,
#[error("expected a format with <key>=<value>")]
MisformatedMap,
}