Subgraph.link

Links two edge slots within this subgraph.

The updated out-edge's color will be automatically set to match slot's'.

  1. err_t link(NodeType* node, InEdge* slot)
  2. err_t link(NodeType* node, InEdge slot)
  3. err_t link(NodeType* node, size_t index, InEdge* slot)
    struct Subgraph
    @nogc nothrow
    link
    (
    string member
    NodeType
    )
    (
    NodeType* node
    ,
    size_t index
    ,)
    if (
    __traits(compiles, mixin (`node.` ~ member ~ `[index] = OutEdge.init`))
    )
    in (NodeStorage.ofNode(node.asNode) in this.nursery && NodeStorage.ofNode(slot.owner) in this.nursery, "tried to update a node from another subgraph")
  4. err_t link(NodeType* node, size_t index, InEdge slot)

Parameters

node NodeType*

Node being updated.

index size_t

Required when the field is only accessible through an indirection.

slot InEdge*

Target slot.