Expand description
This package defines macro attributes associated with HTTP handlers. These attributes are used both to define an HTTP API and to generate an OpenAPI Spec (OAS) v3 document that describes the API. This wraps the dropshot crate to provide a more ergonomic way to define endpoints and channels while also allowing for tracing.
Attribute Macrosยง
- zoo_
channel - As with
zoo_endpoint
, this attribute turns a handler function into a Dropshot endpoint, but first wraps the handler function in such a way that is spawned asynchronously and given the upgraded connection of the givenprotocol
(i.e.WEBSOCKETS
). - zoo_
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.