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 31 32 33
use internal; #[repr(u32)] #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Copy, Clone)] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", serde(rename_all = "kebab-case"))] pub enum Edge { Left = 0, Top = 1, Right = 2, Bottom = 3, Start = 4, End = 5, Horizontal = 6, Vertical = 7, All = 8, } impl From<Edge> for internal::YGEdge { fn from(e: Edge) -> internal::YGEdge { match e { Edge::Left => internal::YGEdge::YGEdgeLeft, Edge::Top => internal::YGEdge::YGEdgeTop, Edge::Right => internal::YGEdge::YGEdgeRight, Edge::Bottom => internal::YGEdge::YGEdgeBottom, Edge::Start => internal::YGEdge::YGEdgeStart, Edge::End => internal::YGEdge::YGEdgeEnd, Edge::Horizontal => internal::YGEdge::YGEdgeHorizontal, Edge::Vertical => internal::YGEdge::YGEdgeVertical, Edge::All => internal::YGEdge::YGEdgeAll, } } }