Expand description

FastPerm

A dead-simple, extreme fast permission flag system for Rust.

Usage

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));

Credit

Functions

Add a permission flag n to a permission digit perm

Check if a flag n is in a permission digit perm.

Remove a flag n from a permission digit perm.