Enum twilight_model::guild::audit_log::AuditLogChange
source · [−]#[non_exhaustive]
pub enum AuditLogChange {
Show 72 variants
AfkChannelId {
new: Option<Id<ChannelMarker>>,
old: Option<Id<ChannelMarker>>,
},
AfkTimeout {
new: u64,
old: u64,
},
Allow {
new: Option<Permissions>,
old: Option<Permissions>,
},
ApplicationId {
new: Option<Id<ApplicationMarker>>,
old: Option<Id<ApplicationMarker>>,
},
Archived {
new: Option<bool>,
old: Option<bool>,
},
Asset {
new: Option<String>,
old: Option<String>,
},
AutoArchiveDuration {
new: Option<AutoArchiveDuration>,
old: Option<AutoArchiveDuration>,
},
Available {
new: Option<bool>,
old: Option<bool>,
},
AvatarHash {
new: Option<String>,
old: Option<String>,
},
BannerHash {
new: Option<String>,
old: Option<String>,
},
Bitrate {
new: Option<u64>,
old: Option<u64>,
},
ChannelId {
new: Option<Id<ChannelMarker>>,
old: Option<Id<ChannelMarker>>,
},
Code {
new: Option<String>,
old: Option<String>,
},
Color {
new: Option<u64>,
old: Option<u64>,
},
CommunicationDisabledUntil {
new: Option<Timestamp>,
old: Option<Timestamp>,
},
Deaf {
new: Option<bool>,
old: Option<bool>,
},
DefaultAutoArchiveDuration {
new: Option<AutoArchiveDuration>,
old: Option<AutoArchiveDuration>,
},
DefaultMessageNotifications {
new: Option<DefaultMessageNotificationLevel>,
old: Option<DefaultMessageNotificationLevel>,
},
Deny {
new: Option<Permissions>,
old: Option<Permissions>,
},
Description {
new: Option<String>,
old: Option<String>,
},
DiscoverySplashHash {
new: Option<String>,
old: Option<String>,
},
EnableEmoticons {
new: Option<bool>,
old: Option<bool>,
},
EntityType {
new: Option<u64>,
old: Option<u64>,
},
ExpireBehavior {
new: Option<u64>,
old: Option<u64>,
},
ExpireGracePeriod {
new: Option<u64>,
old: Option<u64>,
},
ExplicitContentFilter {
new: Option<ExplicitContentFilter>,
old: Option<ExplicitContentFilter>,
},
FormatType {
new: Option<StickerFormatType>,
old: Option<StickerFormatType>,
},
GuildId {
new: Option<Id<GuildMarker>>,
old: Option<Id<GuildMarker>>,
},
Hoist {
new: Option<bool>,
old: Option<bool>,
},
IconHash {
new: Option<String>,
old: Option<String>,
},
Id {
new: Option<Id<GenericMarker>>,
old: Option<Id<GenericMarker>>,
},
Invitable {
new: Option<bool>,
old: Option<bool>,
},
InviterId {
new: Option<Id<UserMarker>>,
old: Option<Id<UserMarker>>,
},
Location {
new: Option<String>,
old: Option<String>,
},
Locked {
new: Option<bool>,
old: Option<bool>,
},
MaxAge {
new: Option<u64>,
old: Option<u64>,
},
MaxUses {
new: Option<u64>,
old: Option<u64>,
},
Mentionable {
new: Option<bool>,
old: Option<bool>,
},
MfaLevel {
new: Option<MfaLevel>,
old: Option<MfaLevel>,
},
Mute {
new: Option<bool>,
old: Option<bool>,
},
Name {
new: Option<String>,
old: Option<String>,
},
Nick {
new: Option<String>,
old: Option<String>,
},
Nsfw {
new: Option<bool>,
old: Option<bool>,
},
NsfwLevel {
new: Option<NSFWLevel>,
old: Option<NSFWLevel>,
},
OwnerId {
new: Option<Id<UserMarker>>,
old: Option<Id<UserMarker>>,
},
PermissionOverwrites {
new: Option<Vec<PermissionOverwrite>>,
old: Option<Vec<PermissionOverwrite>>,
},
Permissions {
new: Option<Permissions>,
old: Option<Permissions>,
},
Position {
new: Option<u64>,
old: Option<u64>,
},
PreferredLocale {
new: Option<String>,
old: Option<String>,
},
PrivacyLevel {
new: Option<PrivacyLevel>,
old: Option<PrivacyLevel>,
},
PruneDeleteDays {
new: Option<u64>,
old: Option<u64>,
},
PublicUpdatesChannelId {
new: Option<Id<ChannelMarker>>,
old: Option<Id<ChannelMarker>>,
},
RateLimitPerUser {
new: Option<u64>,
old: Option<u64>,
},
Region {
new: Option<String>,
old: Option<String>,
},
RoleAdded {
new: Vec<AffectedRole>,
old: Vec<AffectedRole>,
},
RoleRemoved {
new: Vec<AffectedRole>,
old: Vec<AffectedRole>,
},
RulesChannelId {
new: Option<Id<ChannelMarker>>,
old: Option<Id<ChannelMarker>>,
},
SplashHash {
new: Option<String>,
old: Option<String>,
},
Status {
new: Option<u64>,
old: Option<u64>,
},
SystemChannelId {
new: Option<Id<ChannelMarker>>,
old: Option<Id<ChannelMarker>>,
},
Tags {
new: Option<String>,
old: Option<String>,
},
Temporary {
new: Option<bool>,
old: Option<bool>,
},
Topic {
new: Option<String>,
old: Option<String>,
},
Type {
new: Option<u64>,
old: Option<u64>,
},
UnicodeEmoji {
new: Option<String>,
old: Option<String>,
},
UserLimit {
new: Option<u64>,
old: Option<u64>,
},
Uses {
new: Option<u64>,
old: Option<u64>,
},
VanityUrlCode {
new: Option<String>,
old: Option<String>,
},
VerificationLevel {
new: Option<VerificationLevel>,
old: Option<VerificationLevel>,
},
WidgetChannelId {
new: Option<Id<ChannelMarker>>,
old: Option<Id<ChannelMarker>>,
},
WidgetEnabled {
new: Option<bool>,
old: Option<bool>,
},
Other,
}Expand description
Individual change within an AuditLogEntry.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
AfkChannelId
Fields
new: Option<Id<ChannelMarker>>New ID of the AFK channel.
old: Option<Id<ChannelMarker>>Old ID of the AFK channel.
AFK channel ID was changed.
AfkTimeout
Timeout to cause a user to be moved to an AFK voice channel.
Allow
Fields
new: Option<Permissions>New allowed permissions value.
old: Option<Permissions>Old allowed permissions value.
Allowed permissions of a permission overwrite target.
ApplicationId
ID of an application.
Archived
Thread is now archived/unarchived.
Asset
Asset of a sticker.
AutoArchiveDuration
Fields
new: Option<AutoArchiveDuration>New auto archive duration.
old: Option<AutoArchiveDuration>Old auto archive duration.
Auto archive duration of a thread changed.
Available
Availability of a sticker.
AvatarHash
Hash of an avatar.
BannerHash
Fields
Hash of a guild banner.
Bitrate
Bitrate of an audio channel.
ChannelId
Fields
new: Option<Id<ChannelMarker>>New invite’s channel.
old: Option<Id<ChannelMarker>>Old invite’s channel.
Channel for an invite code.
Code
Code of an invite.
Color
Color of a role.
CommunicationDisabledUntil
Member timeout state changed.
Deaf
Fields
Whether a member is guild deafened.
DefaultAutoArchiveDuration
Fields
new: Option<AutoArchiveDuration>New auto archive duration.
old: Option<AutoArchiveDuration>Old auto archive duration.
default auto archive duration for newly created threads changed.
DefaultMessageNotifications
Fields
new: Option<DefaultMessageNotificationLevel>New default message notification level.
old: Option<DefaultMessageNotificationLevel>Old default message notification level.
Default message notification level for a guild.
Deny
Fields
new: Option<Permissions>New denied permissions level.
old: Option<Permissions>Previous state, if any.
Denied permissions of a permission overwrite target.
Description
Description of a guild or sticker.
DiscoverySplashHash
Hash of a guild’s discovery splash.
EnableEmoticons
Fields
Whether emoticons are enabled.
EntityType
Entity type of guild scheduled event was changed.
ExpireBehavior
Behavior of the expiration of an integration.
ExpireGracePeriod
Grace period of the expiration of an integration.
ExplicitContentFilter
Fields
new: Option<ExplicitContentFilter>New explicit content filter level.
old: Option<ExplicitContentFilter>Old explicit content filter level.
Explicit content filter level of a guild.
FormatType
Fields
new: Option<StickerFormatType>New format type of a sticker.
old: Option<StickerFormatType>Old format type of a sticker.
Format type of a sticker.
GuildId
Fields
new: Option<Id<GuildMarker>>New guild that a sticker is in.
old: Option<Id<GuildMarker>>Old guild that a sticker is in.
Guild that a sticker is in.
Hoist
Whether a role is hoisted.
IconHash
Hash of a guild icon.
Id
ID of an entity.
Invitable
Invitable state of a private thread.
InviterId
ID of the user who created an invite.
Location
Location for a scheduled event changed.
Can be an Id<ChannelMarker> or a String.
Locked
Thread was locked or unlocked.
MaxAge
Maximum age of an invite.
MaxUses
Maximum uses of an invite.
Mentionable
Fields
Whether a role can be mentioned in a message.
MfaLevel
Multi-Factor Authentication level required of a guild’s moderators.
Mute
Whether a user is guild muted.
Name
Name of an entity such as a channel or role.
Nick
Nickname of a member.
Nsfw
Whether a channel is NSFW.
NsfwLevel
NSFW level of a guild.
OwnerId
ID of the owner of a guild.
PermissionOverwrites
Fields
new: Option<Vec<PermissionOverwrite>>New set of overwrites.
old: Option<Vec<PermissionOverwrite>>Old set of overwrites.
Permission overwrites on a channel changed.
Permissions
Fields
new: Option<Permissions>New set of permissions.
old: Option<Permissions>Old set of permissions.
Default permissions of a role.
Position
Position of an entity such as a channel or role.
PreferredLocale
Preferred locale of a guild.
PrivacyLevel
Privacy level of a stage instance.
PruneDeleteDays
Number of days’ worth of inactivity for a guild prune.
PublicUpdatesChannelId
Fields
new: Option<Id<ChannelMarker>>New public updates channel ID.
old: Option<Id<ChannelMarker>>Old public updates channel ID.
ID of a guild’s public updates channel.
RateLimitPerUser
Ratelimit per user in a textual channel.
Region
Region of a guild changed.
RoleAdded
Fields
new: Vec<AffectedRole>Minimal information about a added role.
old: Vec<AffectedRole>Previous state, if any.
Role was added to a user.
RoleRemoved
Fields
new: Vec<AffectedRole>Minimal information about a removed role.
old: Vec<AffectedRole>Previous state, if any.
Role was removed from a user.
RulesChannelId
Fields
new: Option<Id<ChannelMarker>>New rules channel.
old: Option<Id<ChannelMarker>>Old rules channel.
Guild’s rules channel.
SplashHash
Fields
Hash of a guild’s splash.
Status
Status of guild scheduled event was changed.
SystemChannelId
Fields
new: Option<Id<ChannelMarker>>New system channel ID.
old: Option<Id<ChannelMarker>>Old system channel ID.
ID of guild’s system channel.
Tags
Fields
Related emoji of a sticker.
Temporary
Whether an invite is temporary.
Topic
Topic of a textual channel.
Type
Type of a created entity.
UnicodeEmoji
Unicode emoji of a role icon changed.
UserLimit
Maximum number of users in a voice channel.
Uses
Number of uses of an invite.
VanityUrlCode
Code of a guild’s vanity invite.
VerificationLevel
Fields
new: Option<VerificationLevel>New verification level.
old: Option<VerificationLevel>Old verification level.
Required verification level of new members in a guild.
WidgetChannelId
Channel ID of a widget.
WidgetEnabled
Fields
Whether a widget is enabled.
Other
Other type of change not covered by other variants.
Implementations
sourceimpl AuditLogChange
impl AuditLogChange
sourcepub const fn key(&self) -> Option<AuditLogChangeKey>
pub const fn key(&self) -> Option<AuditLogChangeKey>
Key of an audit log change.
This may return no key if the variant is Other.
Examples
Check the key of a Uses change:
use twilight_model::guild::audit_log::{
AuditLogChangeKey,
AuditLogChange,
};
let change = AuditLogChange::UserLimit {
new: Some(6),
old: Some(3),
};
assert_eq!(Some(AuditLogChangeKey::UserLimit), change.key());Trait Implementations
sourceimpl Clone for AuditLogChange
impl Clone for AuditLogChange
sourcefn clone(&self) -> AuditLogChange
fn clone(&self) -> AuditLogChange
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 AuditLogChange
impl Debug for AuditLogChange
sourceimpl<'de> Deserialize<'de> for AuditLogChange
impl<'de> Deserialize<'de> for AuditLogChange
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 AuditLogChange
impl Hash for AuditLogChange
sourceimpl PartialEq<AuditLogChange> for AuditLogChange
impl PartialEq<AuditLogChange> for AuditLogChange
sourcefn eq(&self, other: &AuditLogChange) -> bool
fn eq(&self, other: &AuditLogChange) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &AuditLogChange) -> bool
fn ne(&self, other: &AuditLogChange) -> bool
This method tests for !=.
sourceimpl Serialize for AuditLogChange
impl Serialize for AuditLogChange
impl Eq for AuditLogChange
impl StructuralEq for AuditLogChange
impl StructuralPartialEq for AuditLogChange
Auto Trait Implementations
impl RefUnwindSafe for AuditLogChange
impl Send for AuditLogChange
impl Sync for AuditLogChange
impl Unpin for AuditLogChange
impl UnwindSafe for AuditLogChange
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
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