| Crates.io | fastperm |
| lib.rs | fastperm |
| version | 1.0.2 |
| created_at | 2022-03-12 07:54:20.530988+00 |
| updated_at | 2022-03-12 08:12:16.287092+00 |
| description | A dead-simple, extreme fast permission flag system for Rust with no dependencies. |
| homepage | |
| repository | https://github.com/pan93412/fastperm |
| max_upload_size | |
| id | 548662 |
| size | 16,667 |
A dead-simple, extreme fast permission flag system for Rust with no dependencies.
use fastperm::{add, rm, check};
// Add a flag to a permission digit.
assert_eq!(add(0, 1), 2);
// Remove a flag from a permission digit.
assert_eq!(rm(2, 1), 0);
// Check if a flag is in a permission digit.
assert!(check(2, 1));