#[non_exhaustive]
#[repr(u8)]
pub enum ChannelType {
Text,
Private,
Voice,
Category,
News,
NewsThread,
PublicThread,
PrivateThread,
Stage,
Directory,
Forum,
Unknown,
}
Expand description
A representation of a type of channel.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Text
An indicator that the channel is a text GuildChannel
.
Private
An indicator that the channel is a PrivateChannel
.
Voice
An indicator that the channel is a voice GuildChannel
.
Category
An indicator that the channel is the channel of a ChannelCategory
.
News
An indicator that the channel is a NewsChannel
.
Note: NewsChannel
is serialized into a GuildChannel
NewsThread
An indicator that the channel is a news thread GuildChannel
.
PublicThread
An indicator that the channel is a public thread GuildChannel
.
PrivateThread
An indicator that the channel is a private thread GuildChannel
.
Stage
An indicator that the channel is a stage GuildChannel
.
Directory
An indicator that the channel is a directory GuildChannel
in a hub.
Forum
unstable_discord_api
only.An indicator that the channel is a forum GuildChannel
.
Unknown
An indicator that the channel is of unknown type.
Implementations
sourceimpl ChannelType
impl ChannelType
sourceimpl ChannelType
impl ChannelType
Trait Implementations
sourceimpl Clone for ChannelType
impl Clone for ChannelType
sourcefn clone(&self) -> ChannelType
fn clone(&self) -> ChannelType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ChannelType
impl Debug for ChannelType
sourceimpl<'de> Deserialize<'de> for ChannelType
impl<'de> Deserialize<'de> for ChannelType
sourcefn 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
sourceimpl Hash for ChannelType
impl Hash for ChannelType
sourceimpl Ord for ChannelType
impl Ord for ChannelType
sourcefn cmp(&self, other: &ChannelType) -> Ordering
fn cmp(&self, other: &ChannelType) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ChannelType> for ChannelType
impl PartialEq<ChannelType> for ChannelType
sourceimpl PartialOrd<ChannelType> for ChannelType
impl PartialOrd<ChannelType> for ChannelType
sourcefn partial_cmp(&self, other: &ChannelType) -> Option<Ordering>
fn partial_cmp(&self, other: &ChannelType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for ChannelType
impl Serialize for ChannelType
impl Copy for ChannelType
impl Eq for ChannelType
impl StructuralEq for ChannelType
impl StructuralPartialEq for ChannelType
Auto Trait Implementations
impl RefUnwindSafe for ChannelType
impl Send for ChannelType
impl Sync for ChannelType
impl Unpin for ChannelType
impl UnwindSafe for ChannelType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more