use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("{0}")]
Custom(String),
#[error("map keys must be serializable to strings")]
NonStringKey,
}
#[cfg(feature = "typed")]
impl serde::ser::Error for Error {
#[inline]
fn custom<T: std::fmt::Display>(msg: T) -> Self {
Self::Custom(msg.to_string())
}
}