Skip to main content

Crate miko_macros

Crate miko_macros 

Source

Attribute Macros§

body
标记请求体参数
connect
简写:等价于 #[route(..., method = "CONNECT" )]。
delete
简写:等价于 #[route(..., method = "DELETE" )]。
desc
为参数添加描述
get
简写:等价于 #[route(..., method = "GET" )]。
head
简写:等价于 #[route(..., method = "HEAD" )]。
layer
标记 Tower Layer
middleware
中间件
miko
Miko宏
options
简写:等价于 #[route(..., method = "OPTIONS" )]。
patch
简写:等价于 #[route(..., method = "PATCH" )]。
post
简写:等价于 #[route(..., method = "POST" )]。
prefix
Prefix 宏:模块路由前缀
put
简写:等价于 #[route(..., method = "PUT" )]。
query
标记查询参数
route
标准路由属性宏(用于自定义路由)
trace
简写:等价于 #[route(..., method = "TRACE" )]。