pub struct Graph<'tree> { /* private fields */ }
Expand description

A graph produced by executing a graph DSL file. Graphs include a lifetime parameter to ensure that they don’t outlive the tree-sitter syntax tree that they are generated from.

Implementations

Creates a new, empty graph.

Adds a syntax node to the graph, returning a graph DSL reference to it.

The graph won’t contain every syntax node in the parsed syntax tree; it will only contain those nodes that are referenced at some point during the execution of the graph DSL file.

Adds a new graph node to the graph, returning a graph DSL reference to it.

Pretty-prints the contents of this graph.

Trait Implementations

Returns the “default value” for a type. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.