Node

protocol Node : Hashable, Identifiable, Sendable where Self.ID == String
extension Node : Equatable

A base protocol representing a ‘node’ for the automation graph. All parts of the automation graph must conform to the Node protocol.

  • id

    Undocumented

    Declaration

    Swift

    override var id: String { get }
  • isEqual(to:)

    Default implementation

    Returns true if the nodes are equal, false otherwise.

    Default Implementation

    Returns true if the nodes are equal, false otherwise.

    Declaration

    Swift

    func isEqual(to other: any Node) -> Bool
  • ==(_:_:)

    Extension method

    Note: By default, object equality is determined by object id.

    Objects conforming to Node should override this function if they have other properties that should be considered in the equality check.

    Declaration

    Swift

    static func == (lhs: Self, rhs: Self) -> Bool
  • hash(into:)

    Extension method

    Hashes the essential components of this value by feeding them into the given hasher.

    Implement this method to conform to the Hashable protocol. The components used for hashing must be the same as the components compared in your type’s == operator implementation. Call hasher.combine(_:) with each of these components.

    Important

    In your implementation of hash(into:), don’t call finalize() on the hasher instance provided, or replace it with a different instance. Doing so may become a compile-time error in the future.

    Declaration

    Swift

    func hash(into hasher: inout Hasher)
  • eraseToAnyNode()

    Extension method

    Wrap the Node in a type eraser.

    Declaration

    Swift

    func eraseToAnyNode() -> AnyNode