pub struct File {
    pub language: Language,
    pub query: Option<Query>,
    pub stanzas: Vec<Stanza>,
}
Expand description

A graph DSL file

Fields

language: Languagequery: Option<Query>

The combined query of all stanzas in the file

stanzas: Vec<Stanza>

The list of stanzas in the file

Implementations

Executes this graph DSL file against a source file. You must provide the parsed syntax tree (tree) as well as the source text that it was parsed from (source). You also provide the set of functions and global variables that are available during execution.

Executes this graph DSL file against a source file, saving the results into an existing Graph instance. You must provide the parsed syntax tree (tree) as well as the source text that it was parsed from (source). You also provide the set of functions and global variables that are available during execution. This variant is useful when you need to “pre-seed” the graph with some predefined nodes and/or edges before executing the DSL file.

Executes this graph DSL file against a source file. You must provide the parsed syntax tree (tree) as well as the source text that it was parsed from (source). You also provide the set of functions and global variables that are available during execution.

Executes this graph DSL file against a source file, saving the results into an existing Graph instance. You must provide the parsed syntax tree (tree) as well as the source text that it was parsed from (source). You also provide the set of functions and global variables that are available during execution. This variant is useful when you need to “pre-seed” the graph with some predefined nodes and/or edges before executing the DSL file.

Parses a graph DSL file, returning a new File instance.

👎 Deprecated:

Parsing multiple times into the same File instance is unsound. Use File::from_str instead.

Parses a graph DSL file, adding its content to an existing File instance.

Trait Implementations

Formats the value using the given formatter. 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.