pub struct RouteMeta {Show 17 fields
pub name: Option<String>,
pub handler: Option<String>,
pub access: AccessSpec,
pub guards: Vec<Arc<dyn Guard>>,
pub throttle: Option<Throttle>,
pub timeout: Option<Duration>,
pub transactional: bool,
pub api: Option<ApiMeta>,
pub audit_action: Option<String>,
pub body_limit: Option<usize>,
pub no_compression: bool,
pub kind: RouteKind,
pub module: Option<&'static str>,
pub module_id: Option<ModuleId>,
pub full_path: String,
pub method: String,
pub extensions: BTreeMap<String, Value>,
}Expand description
Everything known about a route besides its handler. The pipeline inserts
the matched route’s Arc<RouteMeta> into the request and response
extensions.
Fields§
§name: Option<String>The route name.
handler: Option<String>The code that handles it (DealsController::index), set by
#[controller] (RouteDef::handler_name).
access: AccessSpecWho may call the route.
guards: Vec<Arc<dyn Guard>>Custom guards, in order.
throttle: Option<Throttle>Per-user rate limit.
timeout: Option<Duration>Request timeout override.
transactional: boolDeclared transactional (informational; see RouteDef::transactional).
api: Option<ApiMeta>OpenAPI metadata.
audit_action: Option<String>Custom audit action written after a 2xx response.
body_limit: Option<usize>Request body limit override.
no_compression: boolResponses go out uncompressed (see RouteDef::no_compression).
kind: RouteKindWhether its errors are pages or JSON (see RouteDef::page).
module: Option<&'static str>The module that registered the route (set when mounted).
module_id: Option<ModuleId>The id of that module (set when mounted): Scoped
resolves providers with its visibility.
full_path: StringThe mounted path, e.g. /api/v1/deals/{id} (set when mounted).
method: StringThe HTTP method, e.g. GET.
extensions: BTreeMap<String, Value>OpenAPI specification extensions of the route’s operation
(x-... members; see RouteDef::extension).