loginmanager-codegen 0.0.1

The macro for actix-loginmanager
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented2 out of 2 items with examples
  • Size
  • Source code size: 5.88 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 281.09 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • krealseu/actix-loginmanager
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • krealseu

login_required macros for actix-loginmanager

Syntax

#[login_required(UserType,name="user")]

Attributes

  • UserType - Define the variable type.
  • name="user" - Define the variable name.

Example

use actix_loginmanager::login_required;
// define or import `user` which implements `UserMinix` trait.

#[login_required(User)]
async fn hello()->impl actix_web::Responder{
    user.is_actived(); //can access user:Rc<User>
    return "hello";
}

#[login_required(User,name="user")]
async fn hello()->impl actix_web::Responder{
    user.is_actived(); //can access user:Rc<User>
    return "hello";
}