bit_roles 0.2.2

Granular role management based on bit flags
Documentation
1
2
3
4
5
6
7
8
9
10
use thiserror::Error;

/// The error raised when working with role values.
#[derive(Error, Debug)]
pub enum RoleError {
    /// Raised when the provided role holds a value that is neither zero nor a
    /// power of two.
    #[error("invalid role value: `{0}` is neither zero nor a power of two")]
    InvalidRole(usize),
}