Feature 与 API 地图
本页是 crate 公共表面的导航。精确 trait bound、方法签名与 Rustdoc 请以 docs.rs 为准。
默认与核心
应用与 DI
HTTP 与 Pipeline
Validation、OpenAPI 与 View
可选应用模块
WebSocket 与消息传输
属性宏索引
应用声明
module, injectable, controller, websocket_gateway, message_controller, event_listener, schedule。
HTTP 方法与提取
all, get, post, put, patch, delete, head, options, 对应 JSON 变体,sse, body, request, param, params, query, header, headers, cookie, cookies, host_param, ip, extract, res, uploaded_file, uploaded_files。
路由与响应
host, http_code, redirect, render, serialize, version, versions, version_neutral, validate, skip_validation, metadata, cache_key, cache_ttl。
Pipeline
use_guard, use_interceptor, use_pipe, use_filter, catch, apply_decorators。
OpenAPI 与认证
operation, tag, request_body, api_param, api_query, api_header, api_response_header, api_extension, api_extra_model, hide_from_openapi, bearer_auth, api_security, api_cookie_auth, api_key_auth, oauth2_auth, open_id_connect_auth。
WebSocket、消息、事件与调度
subscribe_message, message_body, payload, message_pattern, event_pattern, on_gateway_init, on_gateway_connection, on_gateway_disconnect, on_event, cron, interval, timeout。
Feature 选择规则
- 从默认 feature 开始,只有存在真实边界时才加入模块。
- library crate 不应强迫下游启用所有 Boot feature。
- 使用
cargo tree -e features -p a3s-boot检查 feature 合并。 - 为生产使用的组合运行 focused test,再为 release 运行
cargo check --all-features。 - 外部 transport feature 的编译成功不代表 broker 已正确配置。