Structures

The following structures are available globally.

  • Allows recursively referencing a struct within itself.

    struct Node {
       // MARK: - Public Properties
       let id: Int
    
       var left: Node {
           self._left.value
       }
       var right: Node {
           self._right.value
       }
    
       // MARK: - Private Properties
       private let _left: IndirectReference<Node>
       private let _right: IndirectReference<Node>
    }
    
    See more

    Declaration

    Swift

    public struct IndirectReference<T> : Hashable where T : Hashable