identifier 0.1.3

Generate 128 bits id structs easily
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use thiserror::Error;

/// An error occurred while parsing an hexadecimal string to an id.
#[derive(Error, Debug)]
pub enum ParseError {
    /// The string representation of the id is not equal to 32 characters
    /// (after removing the dashes).
    #[error("Id length is expected to be 32 characters")]
    InvalidLength,
    /// One or many characters are invalid.
    #[error("Invalid chars")]
    InvalidChars,
    /// The provided validate function returned false.
    #[error("Invalid")]
    Invalid,
}