[][src]Attribute Macro contraband_codegen::controller

#[controller]

Generates a controller.

Syntax: #[controller("path"[, attributes])]

Attributes:

  • "path" or path="path" - Raw literal string with scope for register handler. Path is prepended to the controller´s routes.
  • guard=([, function_name]) - Registers list of function as guards using actix_web::guard::fn_guard.
  • wrap=([, Middleware])" - Registers a list of resource middleware.