SyntaxTreeGetterCollector

Trait SyntaxTreeGetterCollector 

Source
pub trait SyntaxTreeGetterCollector: for<'ast> Visit<'ast> {
    type GetterCollection: GetterCollection;

    // Required method
    fn collect(
        path: &Path,
        syntax_tree: &File,
        identification_mode: IdentificationMode,
        getter_collection: &Self::GetterCollection,
    );
}
Expand description

A Getters collector visting a SyntaxTree.

A SyntaxTree is obtained by parsing a code source with syn. They contain more syntatical information than a TokenStream, however, they imply the syntax is valid. For macros, use a TokenStreamGetterCollector and for documentation code, use a DocCodeGetterCollector.

Required Associated Types§

Required Methods§

Source

fn collect( path: &Path, syntax_tree: &File, identification_mode: IdentificationMode, getter_collection: &Self::GetterCollection, )

Visits the syntax_tree collecting Getters in the GetterCollection.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§