     }
 #endif
 
+public struct LayoutEdge: OptionSet {
+    public let rawValue: UInt8
+    public init(rawValue: UInt8) {
+        self.rawValue = rawValue
+    }
+    public static let top = LayoutEdge(rawValue: 1 << 0)
+    public static let bottom = LayoutEdge(rawValue: 1 << 1)
+    public static let trailing = LayoutEdge(rawValue: 1 << 2)
+    public static let leading = LayoutEdge(rawValue: 1 << 3)
+    public static let left = LayoutEdge(rawValue: 1 << 4)
+    public static let right = LayoutEdge(rawValue: 1 << 5)
+    public static let none = LayoutEdge(rawValue: 1 << 6)
+}
+
 public extension View {
-    
-    enum LayoutEdge {
-        case top
-        case bottom
-        case trailing
-        case leading
-        case left
-        case right
-        case none
-    }
-    
-    
+
     @discardableResult
     public func centerInSuperview(offset: CGPoint = .zero, priority: LayoutPriority = .required, isActive: Bool = true) -> Constraints {
         guard let superview = superview else { fatalError("Unable to create this constraint to it's superview, because it has no superview.") }

        func edgesToSuperview(excluding excludedEdge: LayoutEdge = .none, insets: TinyEdgeInsets = .zero) -> Constraints {
            var constraints = Constraints()
            
            if excludedEdge != .top {
                constraints.append(topToSuperview(offset: insets.top))
            }
            
            if effectiveUserInterfaceLayoutDirection == .leftToRight {
                
                if !(excludedEdge == .leading || excludedEdge == .left) {
                    constraints.append(leftToSuperview(offset: insets.left))
                }
                
                if !(excludedEdge == .trailing || excludedEdge == .right) {
                    constraints.append(rightToSuperview(offset: -insets.right))
                }
            } else {
                
                if !(excludedEdge == .leading || excludedEdge == .right) {
                    constraints.append(rightToSuperview(offset: -insets.right))
                }
                
                if !(excludedEdge == .trailing || excludedEdge == .left) {
                    constraints.append(leftToSuperview(offset: insets.left))
                }
            }
            
            if excludedEdge != .bottom {
                constraints.append(bottomToSuperview(offset: -insets.bottom))
            }
            

        func edgesToSuperview(excluding excludedEdge: LayoutEdge = .none, insets: TinyEdgeInsets = .zero) -> Constraints {
            var constraints = Constraints()
            
            if !excludedEdge.contains(.top) {
                constraints.append(topToSuperview(offset: insets.top))
            }
            
            if !excludedEdge.contains(.left) {
                constraints.append(leftToSuperview(offset: insets.left))
            }
            
            if !excludedEdge.contains(.right) {
                constraints.append(rightToSuperview(offset: -insets.right))
            }
            
            if !excludedEdge.contains(.bottom) {
                constraints.append(bottomToSuperview(offset: -insets.bottom))
            }
            
