Contents

canAddNode(_:)

Returns whether the given node can be added to the graph.

Declaration

func canAddNode(_ node: ComputeNodeGraph.Node) -> Bool

Parameters

  • node:

    The node to test.

Return Value

true if calling addNode(_:) with this node would succeed.

Discussion

This is the non-throwing preflight check for addNode(_:). Use it to validate a node — for example, to gate UI affordances — without modifying the graph.