#[non_exhaustive]pub struct AuditLogEntry {
pub id: AuditLogEntryId,
pub action_type: AuditLogEvent,
pub target_id: Option<GenericId>,
pub user_id: Option<UserId>,
pub changes: Vec<AuditLogChange>,
pub options: Option<Box<AuditLogEntryOptions>>,
pub reason: Option<CompactString>,
pub guild_id: Option<GuildId>,
}Expand description
An audit log entry: one administrative action.
Some actions done in quick succession by the same user are merged into one entry (message deletes, member moves and disconnects, channel and role reordering); only the first reason is kept.
Contains floats (through JsonValue), so it is PartialEq but not Eq (D-064).
discord.js counterpart: GuildAuditLogsEntry.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: AuditLogEntryIdThe entry’s ID.
action_type: AuditLogEventWhat happened.
target_id: Option<GenericId>The affected entity (webhook, user, role, …); for
ApplicationCommandPermissionUpdate
the command or the application.
user_id: Option<UserId>The user or app that made the change.
changes: Vec<AuditLogChange>What was changed on the target.
options: Option<Box<AuditLogEntryOptions>>Extra information for some event types.
reason: Option<CompactString>The reason given with the X-Audit-Log-Reason header (1-512 characters).
guild_id: Option<GuildId>The guild (only in the GUILD_AUDIT_LOG_ENTRY_CREATE gateway event).
Trait Implementations§
Source§impl Clone for AuditLogEntry
impl Clone for AuditLogEntry
Source§impl Debug for AuditLogEntry
impl Debug for AuditLogEntry
Source§impl<'de> Deserialize<'de> for AuditLogEntry
impl<'de> Deserialize<'de> for AuditLogEntry
Source§fn 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
Source§impl From<GuildAuditLogEntryCreate> for AuditLogEntry
impl From<GuildAuditLogEntryCreate> for AuditLogEntry
Source§fn from(event: GuildAuditLogEntryCreate) -> Self
fn from(event: GuildAuditLogEntryCreate) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AuditLogEntry
impl PartialEq for AuditLogEntry
Source§impl Serialize for AuditLogEntry
impl Serialize for AuditLogEntry
impl StructuralPartialEq for AuditLogEntry
Auto Trait Implementations§
impl Freeze for AuditLogEntry
impl RefUnwindSafe for AuditLogEntry
impl Send for AuditLogEntry
impl Sync for AuditLogEntry
impl Unpin for AuditLogEntry
impl UnsafeUnpin for AuditLogEntry
impl UnwindSafe for AuditLogEntry
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
Mutably borrows from an owned value. Read more