diff --git a/x/src/lib.rs b/x/src/lib.rs index fbf5c87..b6d5aed 100644 --- a/x/src/lib.rs +++ b/x/src/lib.rs @@ -24,4 +24,10 @@ import!(sub_xpat, xpat, "xpat"); #[cfg(feature = "macros")] pub use sub_macros::{ FromRepr -}; \ No newline at end of file +}; + +#[cfg(feature = "macros")] +pub trait FromRepr: Sized { + type Repr; + fn from_repr(repr: Self::Repr) -> Option; +} \ No newline at end of file