the from repr trait

This commit is contained in:
Intege-rs
2024-11-19 02:04:05 -05:00
parent 131dbcca12
commit 4ee8cfbafa

View File

@@ -24,4 +24,10 @@ import!(sub_xpat, xpat, "xpat");
#[cfg(feature = "macros")]
pub use sub_macros::{
FromRepr
};
};
#[cfg(feature = "macros")]
pub trait FromRepr: Sized {
type Repr;
fn from_repr(repr: Self::Repr) -> Option<Self>;
}