#[derive(Service)]
{
// Attributes available to this derive:
#[config]
#[init]
}
Expand description
导出所有宏定义(Component、Service、configuration、init)
Service 派生宏
与 Component 类似,但额外生成 Axum 提取器实现
可以直接在 Axum 路由处理函数中使用 &ServiceType 作为参数
#[derive(Service)]
{
// Attributes available to this derive:
#[config]
#[init]
}
导出所有宏定义(Component、Service、configuration、init)
Service 派生宏
与 Component 类似,但额外生成 Axum 提取器实现
可以直接在 Axum 路由处理函数中使用 &ServiceType 作为参数