protocol Node : Hashable, Identifiable, Sendable where Self.ID == Stringextension Node : EquatableA base protocol representing a ‘node’ for the automation graph. All parts of the automation graph must conform to the Node protocol.
-
Undocumented
Declaration
Swift
override var id: String { get } -
Default implementationisEqual(to:)
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 -
Extension methodhash(into:)
Hashes the essential components of this value by feeding them into the given hasher.
Implement this method to conform to the
Hashableprotocol. The components used for hashing must be the same as the components compared in your type’s==operator implementation. Callhasher.combine(_:)with each of these components.Important
In your implementation of
hash(into:), don’t callfinalize()on thehasherinstance 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) -
Extension methoderaseToAnyNode()
Wrap the
Nodein a type eraser.Declaration
Swift
func eraseToAnyNode() -> AnyNode