本页尚未翻译
下面显示的是英文原文。
Contact
Contact names who answers for the service: a person or a team, a URL and an e-mail address, each optional.
AppInfo::contact sets it.
Contact::new starts empty, and name, url and email fill the fields.
A contact with no field filled is left out of the document.
The example runs with cargo test --example asyncapi_info --no-default-features --features asyncapi.
Example
/// Who answers for the service; every field is optional.
fn contact() -> Contact {
Contact::new()
.name("Payments team")
.url("https://example.com/teams/payments")
.email("payments@example.com")
}