message: Implement necessary traits for error types
diff: @@ -70,6 +70,12 @@ impl From<String> for EncodingError {
  }
  }
  +impl From<EncodingError> for String {
  + fn from(e: EncodingError) -> Self {
  + e.into()
  + }
  +}
  +
  impl From<EncodingError> for std::io::Error {
  fn from(e: EncodingError) -> Self {
  e.into()
  @@ -88,6 +94,12 @@ impl From<serde_json::Error> for EncodingError {
  }
  }
  +impl From<EncodingError> for serde_json::Error {
  + fn from(e: EncodingError) -> Self {
  + e.into()
  + }
  +}
  +
  /// Errors from decoding data
  #[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
  pub enum DecodingError {
  @@ -161,6 +173,12 @@ impl From<String> for DecodingError {
  }
  }
  +impl From<DecodingError> for String {
  + fn from(e: DecodingError) -> Self {
  + e.into()
  + }
  +}
  +
  impl From<DecodingError> for std::io::Error {
  fn from(e: DecodingError) -> Self {
  e.into()
  @@ -178,3 +196,9 @@ impl From<serde_json::Error> for DecodingError {
  e.into()
  }
  }
  +
  +impl From<DecodingError> for serde_json::Error {
  + fn from(e: DecodingError) -> Self {
  + e.into()
  + }
  +}
  