pipecircuit 0.0.14

Correct. Robust. Fast. Portable.
Documentation
/// Declares a single-private-field newtype, and provides `new()` and `value()` associated fns
#[macro_export]
macro_rules! value_wrapper {
    (
        $(#[$attribute:meta])*
        $visibility:vis struct $name:ident($value:ty);
    ) => {
        $(#[$attribute])*
        $visibility struct $name($value);

        impl $name {
            #[inline]
            $visibility const fn new(value: $value) -> Self {
                Self(value)
            }

            #[inline]
            $visibility const fn value(self) -> $value {
                self.0
            }
        }
    };
}