pub struct PermissionsConfig {
pub zero_trust: PermissionLevelConfig,
pub user: PermissionLevelConfig,
pub admin: PermissionLevelConfig,
pub users: HashMap<String, PermissionLevelConfig>,
pub channels: HashMap<String, PermissionLevelConfig>,
}Expand description
Container for permission level defaults and per-user/channel overrides.
The three built-in levels (zero_trust, user, admin) are named fields.
Per-user and per-channel overrides use HashMaps keyed by sender ID or
channel name.
Fields§
§zero_trust: PermissionLevelConfigLevel 0 (zero-trust) permission defaults.
user: PermissionLevelConfigLevel 1 (user) permission defaults.
admin: PermissionLevelConfigLevel 2 (admin) permission defaults.
users: HashMap<String, PermissionLevelConfig>Per-user permission overrides, keyed by sender ID.
channels: HashMap<String, PermissionLevelConfig>Per-channel permission overrides, keyed by channel name.
Trait Implementations§
Source§impl Clone for PermissionsConfig
impl Clone for PermissionsConfig
Source§fn clone(&self) -> PermissionsConfig
fn clone(&self) -> PermissionsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PermissionsConfig
impl Debug for PermissionsConfig
Source§impl Default for PermissionsConfig
impl Default for PermissionsConfig
Source§fn default() -> PermissionsConfig
fn default() -> PermissionsConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PermissionsConfig
impl<'de> Deserialize<'de> for PermissionsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PermissionsConfig
impl RefUnwindSafe for PermissionsConfig
impl Send for PermissionsConfig
impl Sync for PermissionsConfig
impl Unpin for PermissionsConfig
impl UnsafeUnpin for PermissionsConfig
impl UnwindSafe for PermissionsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more