class

Analyzer::Rust::Ntex

Inherits Analyzer::Rust::ActixWeb < Analyzer::Rust::RustEngine < FileScanEngine < Analyzer < FileHelper < Reference < Object

ntex (https://github.com/ntex-rs/ntex) is an actix-web fork that keeps the same routing surface: #[web::get("/p")] attribute macros, web::resource("/p").route(web::get().to(h)), .route("/p", ...), web::scope("/prefix") and .configure(fn). The tree-sitter walk in ActixWeb already matches those shapes by their last path segment, so this adapter only swaps the crate gate and the extractor spellings.

Constants

EXTRACTOR_RES = (["Query", "Json", "Form"] of ::String).to_h do |kind| {kind, /(?<![\w:])(?:(?:ntex::)?web::)?(?:types::)?#{kind}\s*</} end

ntex keeps its extractors in web::types (web::types::Json<T>, types::Query<T>), and its examples import them bare (Json<T>) as often as not. The crate gate already limits this to ntex crates, so a bare Json< is ntex's extractor here.

Class methods

tech_name
Source

Instance methods

tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source