Skip to main content

Service

Derive Macro Service 

Source
#[derive(Service)]
{
    // Attributes available to this derive:
    #[config]
    #[init]
}
Expand description

导出所有宏定义(Component、Service、configuration、init) Service 派生宏 与 Component 类似,但额外生成 Axum 提取器实现 可以直接在 Axum 路由处理函数中使用 &ServiceType 作为参数