pub struct GroupPermissions {
pub update_group: Permission,
pub assign_roles: Permission,
pub post_activities: Permission,
pub update_encryption: Permission,
}Expand description
Permissions for group actions in encrypted groups
Defines who can perform various actions within the group based on their role.
Fields§
§update_group: PermissionWho can update group settings
assign_roles: PermissionWho can assign roles to other members
post_activities: PermissionWho can post activities (typically all key holders)
update_encryption: PermissionWho can update group encryption settings
Implementations§
Source§impl GroupPermissions
impl GroupPermissions
Sourcepub fn update_group(self, permission: Permission) -> Self
pub fn update_group(self, permission: Permission) -> Self
Set permission for updating group settings
Sourcepub fn assign_roles(self, permission: Permission) -> Self
pub fn assign_roles(self, permission: Permission) -> Self
Set permission for assigning roles
Sourcepub fn post_activities(self, permission: Permission) -> Self
pub fn post_activities(self, permission: Permission) -> Self
Set permission for posting activities
Sourcepub fn update_encryption(self, permission: Permission) -> Self
pub fn update_encryption(self, permission: Permission) -> Self
Set permission for updating encryption settings
Sourcepub fn can_perform_action(&self, role: &GroupRole, action: GroupAction) -> bool
pub fn can_perform_action(&self, role: &GroupRole, action: GroupAction) -> bool
Check if a role can perform a specific action
Trait Implementations§
Source§impl Clone for GroupPermissions
impl Clone for GroupPermissions
Source§fn clone(&self) -> GroupPermissions
fn clone(&self) -> GroupPermissions
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 GroupPermissions
impl Debug for GroupPermissions
Source§impl Default for GroupPermissions
impl Default for GroupPermissions
Source§impl<'de> Deserialize<'de> for GroupPermissions
impl<'de> Deserialize<'de> for GroupPermissions
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
Source§impl PartialEq for GroupPermissions
impl PartialEq for GroupPermissions
Source§impl Serialize for GroupPermissions
impl Serialize for GroupPermissions
impl Eq for GroupPermissions
impl StructuralPartialEq for GroupPermissions
Auto Trait Implementations§
impl Freeze for GroupPermissions
impl RefUnwindSafe for GroupPermissions
impl Send for GroupPermissions
impl Sync for GroupPermissions
impl Unpin for GroupPermissions
impl UnwindSafe for GroupPermissions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§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