struct RoleGrant {
base: Permissions,
source: (Permissions, Permissions),
target: (Permissions, Permissions),
}Expand description
What a set of roles contributes to a member’s permissions in the source and target channels.
Discord merges a member’s roles by OR-ing their base permissions, and their
role overwrites by OR-ing the allows and the denies separately. Every field
here is merged the same way, so the grant of any set of roles is the
Self::union of the grants of its roles.
Fields§
§base: Permissions§source: (Permissions, Permissions)§target: (Permissions, Permissions)Implementations§
Trait Implementations§
impl Copy for RoleGrant
impl Eq for RoleGrant
impl StructuralPartialEq for RoleGrant
Auto Trait Implementations§
impl Forget for RoleGrant
impl Freeze for RoleGrant
impl Move for RoleGrant
impl RefUnwindSafe for RoleGrant
impl Send for RoleGrant
impl Sync for RoleGrant
impl Unpin for RoleGrant
impl UnsafeUnpin for RoleGrant
impl UnwindSafe for RoleGrant
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more