[][src]Attribute Macro dropshot::endpoint

#[endpoint]

This attribute transforms a handler function into a Dropshot endpoint suitable to be used as a parameter to ApiDescription::register(). It encodes information relevant to the operation of an API endpoint beyond what is expressed by the parameter and return types of a handler function.

This example is not tested
#[endpoint {
    // Required fields
    method = { DELETE | GET | PATCH | POST | PUT },
    path = "/path/name/with/{named}/{variables}",

    // Optional fields
    tags = [ "all", "your", "OpenAPI", "tags" ],
}]

See the dropshot documentation for how to specify an endpoint or a description of the attribute parameters