1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
use internal; #[repr(u32)] #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Copy, Clone)] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] pub enum Wrap { NoWrap = 0, Wrap = 1, WrapReverse = 2, } impl From<Wrap> for internal::YGWrap { fn from(w: Wrap) -> internal::YGWrap { match w { Wrap::NoWrap => internal::YGWrap::YGWrapNoWrap, Wrap::Wrap => internal::YGWrap::YGWrapWrap, Wrap::WrapReverse => internal::YGWrap::YGWrapWrapReverse, } } } impl From<internal::YGWrap> for Wrap { fn from(w: internal::YGWrap) -> Wrap { match w { internal::YGWrap::YGWrapNoWrap => Wrap::NoWrap, internal::YGWrap::YGWrapWrap => Wrap::Wrap, internal::YGWrap::YGWrapWrapReverse => Wrap::WrapReverse, } } }