#[non_exhaustive]pub struct ThreadUpdate {
pub old: Option<Arc<Channel>>,
pub new: ThreadUpdate,
}Expand description
The payload of Events::ThreadUpdate.
Dereferences to new, a ThreadUpdate.
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: ThreadUpdateDiscord’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 ThreadUpdate
impl Clone for ThreadUpdate
Source§impl Debug for ThreadUpdate
impl Debug for ThreadUpdate
Source§impl Deref for ThreadUpdate
impl Deref for ThreadUpdate
Source§type Target = ThreadUpdate
type Target = ThreadUpdate
Source§fn deref(&self) -> &ThreadUpdate
fn deref(&self) -> &ThreadUpdate
Source§impl PartialEq for ThreadUpdate
impl PartialEq for ThreadUpdate
impl StructuralPartialEq for ThreadUpdate
Auto Trait Implementations§
impl Freeze for ThreadUpdate
impl RefUnwindSafe for ThreadUpdate
impl Send for ThreadUpdate
impl Sync for ThreadUpdate
impl Unpin for ThreadUpdate
impl UnsafeUnpin for ThreadUpdate
impl UnwindSafe for ThreadUpdate
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