diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -153,5 +153,18 @@ pub enum RegistryError /// Deserialization failed. #[error("Deserialization failed")] - DeserializationFailed(#[from] DeserializerError), + DeserializationFailed(#[from] DeserializationError), } + +impl From<DeserializerError> for RegistryError +{ + fn from(err: DeserializerError) -> Self + { + DeserializationError(err).into() + } +} + +/// Deserialization error. +#[derive(Debug, thiserror::Error)] +#[error(transparent)] +pub struct DeserializationError(#[from] DeserializerError); |