add_feature in cargo::ops::tree::graph - Rust
Description: Adds a feature node between two nodes.

Skip to main content

## add_feature

# Function add_feature

Source

    fn add_feature(
        graph: &mut Graph<'_>,
        name: InternedString,
        from: Option<NodeId>,
        to: Edge,
    ) -> (bool, NodeId)

Expand description

Adds a feature node between two nodes.

That is, it adds the following:

    from -Edge-> featname -Edge::Feature-> to

Returns a tuple `(missing, index)`. `missing` is true if this feature edge was already added. `index` is the index of the index in the graph of the `Feature` node.