byte-wrapper 0.1.0

Newtype wrappers for hex byte arrays and base64 vectors, with serde and schemars support.
Documentation
/// Error types.
pub mod error {
    /// Error from a `TryFrom` or `FromStr` implementation.
    pub struct ConversionError(::std::borrow::Cow<'static, str>);
    impl ::std::error::Error for ConversionError {}
    impl ::std::fmt::Display for ConversionError {
        fn fmt(
            &self,
            f: &mut ::std::fmt::Formatter<'_>,
        ) -> Result<(), ::std::fmt::Error> {
            ::std::fmt::Display::fmt(&self.0, f)
        }
    }
    impl ::std::fmt::Debug for ConversionError {
        fn fmt(
            &self,
            f: &mut ::std::fmt::Formatter<'_>,
        ) -> Result<(), ::std::fmt::Error> {
            ::std::fmt::Debug::fmt(&self.0, f)
        }
    }
    impl From<&'static str> for ConversionError {
        fn from(value: &'static str) -> Self {
            Self(value.into())
        }
    }
    impl From<String> for ConversionError {
        fn from(value: String) -> Self {
            Self(value.into())
        }
    }
}
///`HasHexWithAttr`
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "title": "HasHexWithAttr",
///  "type": "object",
///  "required": [
///    "checksum"
///  ],
///  "properties": {
///    "checksum": {
///      "type": "string",
///      "maxLength": 64,
///      "minLength": 64,
///      "pattern": "^[0-9a-fA-F]{64}$",
///      "x-rust-type": {
///        "crate": "byte-wrapper",
///        "path": "byte_wrapper::HexArray::<32>",
///        "version": "0.1.0"
///      }
///    }
///  }
///}
/// ```
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct HasHexWithAttr {
    pub checksum: ::byte_wrapper::HexArray<32>,
}