AsyncApi

Derive Macro AsyncApi 

Source
#[derive(AsyncApi)]
{
    // Attributes available to this derive:
    #[asyncapi]
    #[asyncapi_server]
    #[asyncapi_channel]
    #[asyncapi_operation]
    #[asyncapi_messages]
}
Expand description

Derive macro for generating complete AsyncAPI specification

§Example

use asyncapi_rust::AsyncApi;

#[derive(AsyncApi)]
#[asyncapi(
    title = "Chat API",
    version = "1.0.0",
    description = "A real-time chat API"
)]
struct ChatApi;