sa-token-macro
Procedural macros for sa-token-rust.
Features
- 🎯 Annotation Style: Java-like annotation syntax
- ✅ Compile-time Checking: Catch errors before runtime
- 🔧 Easy to Use: Decorator-style authentication
- 📝 Comprehensive: All authentication scenarios covered
Installation
[]
= "0.1.9"
= "0.1.9"
Macros
Login Check
use sa_check_login;
async
Permission Check
use sa_check_permission;
async
Role Check
use sa_check_role;
async
Multiple Permissions (AND)
use sa_check_permissions_and;
async
Multiple Permissions (OR)
use sa_check_permissions_or;
async
Ignore Authentication
use sa_ignore;
async
Permission Matching Rules
See Permission Matching Documentation for detailed rules.
Author
金书记
License
Licensed under either of Apache-2.0 or MIT.