1 2 3 4 5 6 7 8 9 10 11
use thiserror::Error; #[derive(Error, Debug, PartialEq)] #[error("A utils error occurred: {0}")] pub struct ValidationError(String); impl ValidationError { pub fn new(msg: &str) -> Self { ValidationError(msg.to_string()) } }