Skip to main content

display

Attribute Macro display 

Source
#[display]
Expand description

Declares an endpoint’s display name as a resource reference.

#[display("literal")] is a fixed name. #[display(key = "...")] resolves the key from the host’s resource files; text supplies a literal fallback when the key is absent. Localization is a host-wide culture setting, not one attribute per language.

ⓘ
#[get("/api/blog")]
#[display(key = "endpoint.blog.list.name", text = "博客模块-博客列表")]
impl IRequest<Vec<BlogModel>> for ListBlogRequest {}