cgp-field 0.7.0

Context-generic programming field traits
Documentation
1
2
3
4
5
6
7
use core::marker::PhantomData;

pub trait FromVariant<Tag> {
    type Value;

    fn from_variant(_tag: PhantomData<Tag>, value: Self::Value) -> Self;
}