Enum Change

Source
#[non_exhaustive]
pub enum Change {
Show 82 variants Actions { old: Option<Vec<Action>>, new: Option<Vec<Action>>, }, AfkChannelId { old: Option<ChannelId>, new: Option<ChannelId>, }, AfkTimeout { old: Option<AfkTimeout>, new: Option<AfkTimeout>, }, Allow { old: Option<Permissions>, new: Option<Permissions>, }, ApplicationId { old: Option<ApplicationId>, new: Option<ApplicationId>, }, Archived { old: Option<bool>, new: Option<bool>, }, Asset { old: Option<String>, new: Option<String>, }, AutoArchiveDuration { old: Option<u16>, new: Option<u16>, }, Available { old: Option<bool>, new: Option<bool>, }, AvatarHash { old: Option<ImageHash>, new: Option<ImageHash>, }, BannerHash { old: Option<ImageHash>, new: Option<ImageHash>, }, Bitrate { old: Option<u32>, new: Option<u32>, }, ChannelId { old: Option<ChannelId>, new: Option<ChannelId>, }, Code { old: Option<String>, new: Option<String>, }, Color { old: Option<u32>, new: Option<u32>, }, CommunicationDisabledUntil { old: Option<Timestamp>, new: Option<Timestamp>, }, Deaf { old: Option<bool>, new: Option<bool>, }, DefaultAutoArchiveDuration { old: Option<u16>, new: Option<u16>, }, DefaultMessageNotifications { old: Option<DefaultMessageNotificationLevel>, new: Option<DefaultMessageNotificationLevel>, }, Deny { old: Option<Permissions>, new: Option<Permissions>, }, Description { old: Option<String>, new: Option<String>, }, DiscoverySplashHash { old: Option<ImageHash>, new: Option<ImageHash>, }, Enabled { old: Option<bool>, new: Option<bool>, }, EnableEmoticons { old: Option<bool>, new: Option<bool>, }, EntityType { old: Option<u64>, new: Option<u64>, }, EventType { old: Option<EventType>, new: Option<EventType>, }, ExemptChannels { old: Option<Vec<ChannelId>>, new: Option<Vec<ChannelId>>, }, ExemptRoles { old: Option<Vec<RoleId>>, new: Option<Vec<RoleId>>, }, ExpireBehavior { old: Option<u64>, new: Option<u64>, }, ExpireGracePeriod { old: Option<u64>, new: Option<u64>, }, ExplicitContentFilter { old: Option<ExplicitContentFilter>, new: Option<ExplicitContentFilter>, }, Flags { old: Option<u64>, new: Option<u64>, }, FormatType { old: Option<StickerFormatType>, new: Option<StickerFormatType>, }, GuildId { old: Option<GuildId>, new: Option<GuildId>, }, Hoist { old: Option<bool>, new: Option<bool>, }, IconHash { old: Option<ImageHash>, new: Option<ImageHash>, }, Id { old: Option<GenericId>, new: Option<GenericId>, }, ImageHash { old: Option<ImageHash>, new: Option<ImageHash>, }, Invitable { old: Option<bool>, new: Option<bool>, }, InviterId { old: Option<UserId>, new: Option<UserId>, }, Location { old: Option<String>, new: Option<String>, }, Locked { old: Option<bool>, new: Option<bool>, }, MaxAge { old: Option<u32>, new: Option<u32>, }, MaxUses { old: Option<u8>, new: Option<u8>, }, Mentionable { old: Option<bool>, new: Option<bool>, }, MfaLevel { old: Option<MfaLevel>, new: Option<MfaLevel>, }, Mute { old: Option<bool>, new: Option<bool>, }, Name { old: Option<String>, new: Option<String>, }, Nick { old: Option<String>, new: Option<String>, }, Nsfw { old: Option<bool>, new: Option<bool>, }, OwnerId { old: Option<UserId>, new: Option<UserId>, }, PermissionOverwrites { old: Option<Vec<PermissionOverwrite>>, new: Option<Vec<PermissionOverwrite>>, }, Permissions { old: Option<Permissions>, new: Option<Permissions>, }, Position { old: Option<u32>, new: Option<u32>, }, PreferredLocale { old: Option<String>, new: Option<String>, }, PrivacyLevel { old: Option<u64>, new: Option<u64>, }, PruneDeleteDays { old: Option<u64>, new: Option<u64>, }, PublicUpdatesChannelId { old: Option<ChannelId>, new: Option<ChannelId>, }, RateLimitPerUser { old: Option<u16>, new: Option<u16>, }, Region { old: Option<String>, new: Option<String>, }, RulesChannelId { old: Option<ChannelId>, new: Option<ChannelId>, }, SplashHash { old: Option<ImageHash>, new: Option<ImageHash>, }, Status { old: Option<u64>, new: Option<u64>, }, SystemChannelFlags { old: Option<SystemChannelFlags>, new: Option<SystemChannelFlags>, }, SystemChannelId { old: Option<ChannelId>, new: Option<ChannelId>, }, Tags { old: Option<String>, new: Option<String>, }, Temporary { old: Option<bool>, new: Option<bool>, }, Topic { old: Option<String>, new: Option<String>, }, TriggerMetadata { old: Option<TriggerMetadata>, new: Option<TriggerMetadata>, }, TriggerType { old: Option<TriggerType>, new: Option<TriggerType>, }, Type { old: Option<EntityType>, new: Option<EntityType>, }, UnicodeEmoji { old: Option<String>, new: Option<String>, }, UserLimit { old: Option<u64>, new: Option<u64>, }, Uses { old: Option<u64>, new: Option<u64>, }, VanityUrlCode { old: Option<String>, new: Option<String>, }, VerificationLevel { old: Option<VerificationLevel>, new: Option<VerificationLevel>, }, WidgetChannelId { old: Option<ChannelId>, new: Option<ChannelId>, }, WidgetEnabled { old: Option<bool>, new: Option<bool>, }, RolesAdded { old: Option<Vec<AffectedRole>>, new: Option<Vec<AffectedRole>>, }, RolesRemove { old: Option<Vec<AffectedRole>>, new: Option<Vec<AffectedRole>>, }, Other { name: String, old_value: Option<Value>, new_value: Option<Value>, }, Unknown,
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Actions

Fields

§

AfkChannelId

AFK channel was changed.

§

AfkTimeout

AFK timeout duration was changed.

§

Allow

Permission on a text or voice channel was allowed for a role.

§

ApplicationId

Application ID of the added or removed webhook or bot.

§

Archived

Thread is now archived/unarchived.

Fields

§

Asset

Fields

§

AutoArchiveDuration

Auto archive duration of a thread was changed.

Fields

§

Available

Availability of a sticker was changed.

Fields

§

AvatarHash

User avatar was changed.

§

BannerHash

Guild banner was changed.

§

Bitrate

Voice channel bitrate was changed.

Fields

§

ChannelId

Channel for invite code or guild scheduled event was changed.

§

Code

Invite code was changed.

Fields

§

Color

Role color was changed.

Fields

§

CommunicationDisabledUntil

Member timeout state was changed.

§

Deaf

User was server deafened/undeafened.

Fields

§

DefaultAutoArchiveDuration

Default auto archive duration for newly created threads was changed.

Fields

§

DefaultMessageNotifications

Default message notification level for a server was changed.

§

Deny

Permission on a text or voice channel was denied for a role.

§

Description

Description for guild, sticker, or guild scheduled event was changed.

Fields

§

DiscoverySplashHash

Guild’s discovery splash was changed.

§

Enabled

Fields

§

EnableEmoticons

Integration emoticons was enabled/disabled.

Fields

§

EntityType

Entity type of guild scheduled event was changed.

Fields

§

EventType

§

ExemptChannels

§

ExemptRoles

Fields

§

ExpireBehavior

Behavior of the expiration of an integration was changed.

Fields

§

ExpireGracePeriod

Grace period of the expiration of an integration was changed.

Fields

§

ExplicitContentFilter

Explicit content filter level of a guild was changed.

§

Flags

Unknown but sent by discord

Fields

§

FormatType

Format type of a sticker was changed.

§

GuildId

Guild a sticker is in was changed.

Fields

§

Hoist

Role is now displayed/no longer displayed separate from online users.

Fields

§

IconHash

Guild icon was changed.

§

Id

Guild scheduled event cover image was changed.

§

ImageHash

ID of the changed entity.

§

Invitable

Private thread’s invitable state was changed.

Fields

§

InviterId

ID of the user who created the invite.

Fields

§

Location

Location for a guild scheduled event was changed.

Fields

§

Locked

Thread was locked/unlocked.

Fields

§

MaxAge

How long invite code lasts was changed.

Fields

§

MaxUses

Maximum uses of an invite was changed.

Fields

§old: Option<u8>
§new: Option<u8>
§

Mentionable

Whether a role can be mentioned in a message was changed.

Fields

§

MfaLevel

Multi-factor authentication requirement was changed.

§

Mute

User was server muted/unmuted.

Fields

§

Name

Name of an entity was changed.

Fields

§

Nick

Nickname of a member was changed.

Fields

§

Nsfw

Channel NSFW restriction was changed.

Fields

§

OwnerId

Owner of a guild was changed.

Fields

§

PermissionOverwrites

Permissions on a channel were changed.

§

Permissions

Permissions for a role were changed.

§

Position

Channel or role position was changed.

Fields

§

PreferredLocale

Preferred locale of a guild was changed.

Fields

§

PrivacyLevel

Privacy level of the stage instance was changed.

Fields

§

PruneDeleteDays

Number of days after which inactive and role-unassigned members are kicked was changed.

Fields

§

PublicUpdatesChannelId

ID of the public updates channel was changed.

§

RateLimitPerUser

Ratelimit per user in a text channel was changed.

Fields

§

Region

Region of a guild was changed.

Fields

§

RulesChannelId

ID of the rules channel was changed.

§

SplashHash

Invite splash page artwork was changed.

§

Status

Status of guild scheduled event was changed.

Fields

§

SystemChannelFlags

System channel settings were changed.

§

SystemChannelId

ID of the system channel was changed.

§

Tags

Related emoji of a sticker was changed.

Fields

§

Temporary

Whether an invite is temporary or never expires was changed.

Fields

§

Topic

Topic of a text channel or stage instance was changed.

Fields

§

TriggerMetadata

§

TriggerType

§

Type

Type of a created entity.

§

UnicodeEmoji

Unicode emoji of a role icon was changed.

Fields

§

UserLimit

Maximum number of users in a voice channel was changed.

Fields

§

Uses

Number of uses of an invite was changed.

Fields

§

VanityUrlCode

Guild invite vanity url was changed.

Fields

§

VerificationLevel

Required verification level for new members was changed.

§

WidgetChannelId

Channel of the server widget was changed.

§

WidgetEnabled

Whether a widget is enabled or not was changed.

Fields

§

RolesAdded

Role was added to a member.

§

RolesRemove

Role was removed to a member.

§

Other

Unknown key was changed.

Fields

§name: String
§old_value: Option<Value>
§new_value: Option<Value>
§

Unknown

Unknown key was changed and was invalid

Implementations§

Source§

impl Change

Source

pub fn key(&self) -> &str

Trait Implementations§

Source§

impl Clone for Change

Source§

fn clone(&self) -> Change

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Change

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Change

Source§

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 PartialEq for Change

Source§

fn eq(&self, other: &Change) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Change

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Change

Source§

impl StructuralPartialEq for Change

Auto Trait Implementations§

§

impl Freeze for Change

§

impl RefUnwindSafe for Change

§

impl Send for Change

§

impl Sync for Change

§

impl Unpin for Change

§

impl UnwindSafe for Change

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneDebuggableStorage for T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> CloneableStorage for T
where T: Any + Send + Sync + Clone,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DebuggableStorage for T
where T: Any + Send + Sync + Debug,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T