vts 1.1.2

Macro to generate boiler plate to define new types with associated constraints
Documentation
use vts::vts;

vts! {
    #[derive(Debug, Clone, PartialEq, Eq, Hash)]
    type NonZeroInt = u32
        where self.0 > 0;

    type NoConstraint = String;
}

vts! {
    type NoType;
}

#[test]
fn test_1() {
    assert!(matches!(NonZeroInt::new(0), Err(NonZeroIntConstraintError)));
    assert!(matches!(NonZeroInt::new(1), Ok(_)));
}