Skip to main content

WebxRequestMeta

Derive Macro WebxRequestMeta 

Source
#[derive(WebxRequestMeta)]
{
    // Attributes available to this derive:
    #[frompath]
    #[fromquery]
    #[frombody]
    #[fromform]
    #[fromfile]
    #[fromheader]
    #[fromclaim]
    #[request]
}
Expand description

Registers parameter metadata and the request binder from #[from*] fields.

Markers: #[frompath], #[fromquery], #[frombody], #[fromform], #[fromfile], #[fromheader("Name")], #[fromclaim("key")]. Every marker except #[frombody] accepts an optional source key.

Unmarked fields follow the request method: GET/HEAD/DELETE/OPTIONS bind from the query string, then the route; POST/PUT/PATCH bind from the JSON body, then the form, then the query string. Headers and claims are opt-in only. #[request(queryall)] forces unmarked fields to the query.