Attribute Macros§
- ApiBody
- Use this macro to generate serde
Serialize
/Deserialize
impls in addition to anApiBody
impl that can hand back information about the shape of the type.
Derive Macros§
- ApiError
- Use this macro to generate an
Into<ApiError>
implementation for your custom error type. Your custom error type needs to implementDebug
andDisplay
in order to deriveApiError
.Display
in particular determines what the error message will be. You can then use attribtues to set the status code, and decide on whether the error message will beinternal
-only orexternal
.