the from repr trait
This commit is contained in:
@@ -24,4 +24,10 @@ import!(sub_xpat, xpat, "xpat");
|
|||||||
#[cfg(feature = "macros")]
|
#[cfg(feature = "macros")]
|
||||||
pub use sub_macros::{
|
pub use sub_macros::{
|
||||||
FromRepr
|
FromRepr
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(feature = "macros")]
|
||||||
|
pub trait FromRepr: Sized {
|
||||||
|
type Repr;
|
||||||
|
fn from_repr(repr: Self::Repr) -> Option<Self>;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user