RouteExtractor

Trait RouteExtractor 

Source
pub trait RouteExtractor {
    // Required method
    fn extract_routes(&self, parsed_files: &[ParsedFile]) -> Vec<RouteInfo>;
}
Expand description

Trait for extracting route information from parsed Rust files.

Implementations of this trait know how to analyze the AST of a specific web framework and extract route definitions, including paths, HTTP methods, parameters, and type information.

Required Methods§

Source

fn extract_routes(&self, parsed_files: &[ParsedFile]) -> Vec<RouteInfo>

Extracts all route information from parsed Rust files.

§Arguments
  • parsed_files - All successfully parsed Rust source files in the project
§Returns

Returns a vector of RouteInfo structs, one for each discovered route across all files.

Implementors§