pub enum Channel {
SavedMessages {
id: String,
user: String,
},
DirectMessage {
id: String,
active: bool,
recipients: Vec<String>,
last_message_id: Option<String>,
},
Group {
id: String,
name: String,
owner: String,
description: Option<String>,
recipients: Vec<String>,
icon: Option<Attachment>,
last_message_id: Option<String>,
permissions: Option<Permission>,
nsfw: bool,
},
TextChannel {
id: String,
server: String,
name: String,
description: Option<String>,
icon: Option<Attachment>,
last_message_id: Option<String>,
default_permissions: Option<OverrideField>,
role_permissions: HashMap<String, OverrideField>,
nsfw: bool,
},
VoiceChannel {
id: String,
server: String,
name: String,
description: Option<String>,
icon: Option<Attachment>,
default_permissions: Option<OverrideField>,
role_permissions: HashMap<String, OverrideField>,
nsfw: bool,
},
}Expand description
Representation of a channel on Revolt
Variants§
SavedMessages
Personal “Saved Notes” channel which allows users to save messages
DirectMessage
Direct message channel between two users
Fields
Group
Group channel between 1 or more participants
Fields
§
icon: Option<Attachment>Custom icon attachment
§
permissions: Option<Permission>Permissions assigned to members of this group (does not apply to the owner of the group)
TextChannel
Text channel belonging to a server
Fields
§
icon: Option<Attachment>Custom icon attachment
§
default_permissions: Option<OverrideField>Default permissions assigned to users in this channel
§
role_permissions: HashMap<String, OverrideField>Permissions assigned based on role to this channel
VoiceChannel
Voice channel belonging to a server
Fields
§
icon: Option<Attachment>Custom icon attachment
§
default_permissions: Option<OverrideField>Default permissions assigned to users in this channel
§
role_permissions: HashMap<String, OverrideField>Permissions assigned based on role to this channel
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Channel
impl<'de> Deserialize<'de> for Channel
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 Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
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