Skip to main content

EndpointDerive

Derive Macro EndpointDerive 

Source
#[derive(EndpointDerive)]
{
    // Attributes available to this derive:
    #[endpoint]
    #[response]
    #[params]
    #[query]
    #[body]
    #[headers]
    #[param]
    #[query_field]
}
Available on crate feature macros only.
Expand description

Derives Endpoint.

#[derive(Endpoint)]
#[endpoint(method = GET, path = "/items/:id")]
struct GetItem {
    #[response]
    Item,
    #[params]
    ItemParams,
}