newtype-tools 1.0.13

A lightweight library designed to make the newtype idiom more ergonomic to use.
Documentation
/// `#[newtype(shr(type, output = type, with = expr))]`

mod missing_type {
    #[derive(newtype_tools::Newtype)]
    #[newtype(shr())]
    struct Oranges(u32);
}

mod missing_type_comma {
    #[derive(newtype_tools::Newtype)]
    #[newtype(shr(u64))]
    struct Oranges(u32);
}

mod missing_type_comma_output {
    #[derive(newtype_tools::Newtype)]
    #[newtype(shr(u64,))]
    struct Oranges(u32);
}

mod missing_type_comma_output_eq {
    #[derive(newtype_tools::Newtype)]
    #[newtype(shr(u64, output))]
    struct Oranges(u32);
}

mod missing_type_comma_output_eq_type {
    #[derive(newtype_tools::Newtype)]
    #[newtype(shr(u64, output =))]
    struct Oranges(u32);
}

mod missing_type_comma_output_eq_type_comma {
    #[derive(newtype_tools::Newtype)]
    #[newtype(shr(u64, output = u64))]
    struct Oranges(u32);
}

mod missing_type_comma_output_eq_type_comma_with {
    #[derive(newtype_tools::Newtype)]
    #[newtype(shr(u64, output = u64,))]
    struct Oranges(u32);
}

mod missing_type_comma_output_eq_type_comma_with_eq {
    #[derive(newtype_tools::Newtype)]
    #[newtype(shr(u64, output = u64, with))]
    struct Oranges(u32);
}

mod missing_type_comma_output_eq_type_comma_with_eq_expr {
    #[derive(newtype_tools::Newtype)]
    #[newtype(shr(u64, output = u64, with =))]
    struct Oranges(u32);
}

fn main() {}