1
2
3
4
5
6
7
8
9
10
#[macro_export]
macro_rules! implement_from_for_wrapper {
    ($self: ty, $type: ty, $variant: ident) => {
        impl From<$type> for $self {
            fn from(value: $type) -> Self {
                Self::$variant(value)
            }
        }
    };
}