pub struct ChannelPermission {
pub name: String,
pub bits: u8,
}Expand description
Channel permission.
Single channel permission information.
§Example
let channel_permission = // Channel
.get()
.manage();Fields§
§name: StringName of channel for which permission level specified.
bits: u8Bitmask with configured permission level.
Implementations§
Source§impl ChannelPermission
Channel-based endpoint permissions.
impl ChannelPermission
Channel-based endpoint permissions.
Trait contains methods to configure permissions to access endpoints related
to channels.
Sourcepub fn read(self) -> Box<Self>
pub fn read(self) -> Box<Self>
Resource read permissions.
This permission for channel (including channel-pnpres) allows to:
- subscribe
- retrieve list of subscribers
- get state associated with
userId - associate state with
userId - fetch messages history
- fetch messages history with message actions
- fetch message actions
- retrieve messages count
- list files
- download files
- register for push notifications
- unregister from push notifications
Sourcepub fn write(self) -> Box<Self>
pub fn write(self) -> Box<Self>
Resource write permissions.
This permission for channel allows to:
- publish message
- add message action
- send signal
- send file
Sourcepub fn delete(self) -> Box<Self>
pub fn delete(self) -> Box<Self>
Resource delete permissions.
This permission for channel allows to:
- delete messages
- delete message action
- delete file
- delete channel metadata
Sourcepub fn get(self) -> Box<Self>
pub fn get(self) -> Box<Self>
Resource get permissions.
This permission for channel allows to:
- get channel metadata
- get channel members
Sourcepub fn update(self) -> Box<Self>
pub fn update(self) -> Box<Self>
Resource update permissions.
This permission for channel allows to:
- set channel metadata
Trait Implementations§
Source§impl Debug for ChannelPermission
impl Debug for ChannelPermission
Source§impl Permission for ChannelPermission
impl Permission for ChannelPermission
Auto Trait Implementations§
impl Freeze for ChannelPermission
impl RefUnwindSafe for ChannelPermission
impl Send for ChannelPermission
impl Sync for ChannelPermission
impl Unpin for ChannelPermission
impl UnwindSafe for ChannelPermission
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