跳到主要内容
本页尚未翻译

下面显示的是英文原文。

ExternalDocs

ExternalDocs points at documentation kept outside the document: a URL and what the reader finds there.

AppInfo::external_docs sets it for the service, and Tag::external_docs for a tag. ExternalDocs::new takes the URL. description says what is there. The example runs with cargo test --example asyncapi_info --no-default-features --features asyncapi.

Example​

/// Where the prose about the service lives.
fn external_docs() -> ExternalDocs {
ExternalDocs::new("https://example.com/runbooks/payments").description("The runbook")
}