pub enum ChannelType {
Text,
Announcement,
Voice,
Category,
Merged,
Dm,
Group,
}
Expand description
An intermediate representation of a channel’s type. This is never used directly, but is used to help deserialization.
Variants§
Text
A text channel.
Announcement
An announcement channel.
Voice
A voice channel.
Category
A category of channels.
Merged
Two or more channels merged together.
Dm
A standard DM channel.
Group
A group DM channel.
Implementations§
Source§impl ChannelType
impl ChannelType
Sourcepub const fn is_guild_text_based(&self) -> bool
pub const fn is_guild_text_based(&self) -> bool
Returns whether the channel type is a text-based channel in a guild.
Sourcepub const fn is_text_based(&self) -> bool
pub const fn is_text_based(&self) -> bool
Returns whether the channel type is a text-based channel.
Trait Implementations§
Source§impl Clone for ChannelType
impl Clone for ChannelType
Source§fn clone(&self) -> ChannelType
fn clone(&self) -> ChannelType
Returns a copy 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 ChannelType
impl Debug for ChannelType
Source§impl<'de> Deserialize<'de> for ChannelType
impl<'de> Deserialize<'de> for ChannelType
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 FromStr for ChannelType
impl FromStr for ChannelType
Source§impl PartialEq for ChannelType
impl PartialEq for ChannelType
impl Copy for ChannelType
impl Eq for ChannelType
impl StructuralPartialEq for ChannelType
Auto Trait Implementations§
impl Freeze for ChannelType
impl RefUnwindSafe for ChannelType
impl Send for ChannelType
impl Sync for ChannelType
impl Unpin for ChannelType
impl UnwindSafe for ChannelType
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