#[non_exhaustive]pub struct ChannelDelete {
pub old: Option<Arc<Channel>>,
pub new: ChannelDelete,
}Expand description
The payload of Events::ChannelDelete.
Dereferences to new, a ChannelDelete.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.old: Option<Arc<Channel>>What the cache held before the event, if it held it.
new: ChannelDeleteDiscord’s data for the event.
Methods from Deref<Target = Channel>§
Sourcepub fn id(&self) -> Id<ChannelMarker>
pub fn id(&self) -> Id<ChannelMarker>
The channel’s ID.
discord.js counterpart: BaseChannel#id.
Sourcepub fn kind(&self) -> ChannelType
pub fn kind(&self) -> ChannelType
The kind of channel.
discord.js counterpart: BaseChannel#type.
Sourcepub fn guild_id(&self) -> Option<Id<GuildMarker>>
pub fn guild_id(&self) -> Option<Id<GuildMarker>>
The guild the channel belongs to. None for DMs, and for guild channels inside
GUILD_CREATE (where Discord omits it).
discord.js counterpart: GuildChannel#guildId.
Sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
The channel’s name. None for DMs and unnamed group DMs.
discord.js counterpart: GuildChannel#name.
Sourcepub fn parent_id(&self) -> Option<Id<ChannelMarker>>
pub fn parent_id(&self) -> Option<Id<ChannelMarker>>
The parent: the category of a guild channel, or the channel a thread was created in.
discord.js counterpart: GuildChannel#parentId.
Sourcepub fn flags(&self) -> ChannelFlags
pub fn flags(&self) -> ChannelFlags
The channel’s flags.
discord.js counterpart: BaseChannel#flags.
Sourcepub fn permission_overwrites(&self) -> &[Overwrite]
pub fn permission_overwrites(&self) -> &[Overwrite]
The permission overwrites of a guild channel; empty for DMs and threads.
discord.js counterpart: GuildChannel#permissionOverwrites.
Sourcepub fn as_thread(&self) -> Option<&ThreadChannel>
pub fn as_thread(&self) -> Option<&ThreadChannel>
Returns the thread data if this channel is a thread.
discord.js counterpart: BaseChannel#isThread.
Trait Implementations§
Source§impl Clone for ChannelDelete
impl Clone for ChannelDelete
Source§impl Debug for ChannelDelete
impl Debug for ChannelDelete
Source§impl Deref for ChannelDelete
impl Deref for ChannelDelete
Source§type Target = ChannelDelete
type Target = ChannelDelete
Source§fn deref(&self) -> &ChannelDelete
fn deref(&self) -> &ChannelDelete
Source§impl PartialEq for ChannelDelete
impl PartialEq for ChannelDelete
impl StructuralPartialEq for ChannelDelete
Auto Trait Implementations§
impl Freeze for ChannelDelete
impl RefUnwindSafe for ChannelDelete
impl Send for ChannelDelete
impl Sync for ChannelDelete
impl Unpin for ChannelDelete
impl UnsafeUnpin for ChannelDelete
impl UnwindSafe for ChannelDelete
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more