Contents

canAddEdge(_:)

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

Declaration

func canAddEdge(_ edge: ComputeNodeGraph.Edge) -> Bool

Parameters

  • edge:

    The edge to test.

Return Value

true if calling addEdge(_:) with this edge would succeed.

Discussion

This is the non-throwing preflight check for addEdge(_:). Use it to validate a connection — for example, to highlight compatible ports during drag-and-drop — without modifying the graph.