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 Getter
s 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§
Sourcetype GetterCollection: GetterCollection
type GetterCollection: GetterCollection
Type for the GetterCollection
used by this SyntaxTreeGetterCollector
.
Required Methods§
Sourcefn collect(
path: &Path,
syntax_tree: &File,
identification_mode: IdentificationMode,
getter_collection: &Self::GetterCollection,
)
fn collect( path: &Path, syntax_tree: &File, identification_mode: IdentificationMode, getter_collection: &Self::GetterCollection, )
Visits the syntax_tree
collecting Getter
s
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.