#actix-web #derive #utility

已撤回 actix-jwt-auth-middleware-macros

此crate提供了一个为actix-web::FromRequest trait的derive宏

0.1.0 2022年6月1日

#284 in #actix-web

MIT/Apache

4KB

actix-jwt-auth-middleware-macros

此crate提供了一个为actix_web::FromRequest trait的derive宏

示例

use actix-jwt-auth-middleware-macros::FromRequest;
#[derive(Clone, FromRequest)]
struct UserClaims {
    id: u32,
    role: Role,
}

lib.rs:

actix-jwt-auth-middleware-macros

此crate提供了一个为actix_web::FromRequest trait的derive宏

示例

use actix-jwt-auth-middleware-macros::FromRequest;
#[derive(Clone, FromRequest)]
struct UserClaims {
    id: u32,
    role: Role,
}

依赖

~1.5MB
~35K SLoC