#[non_exhaustive]pub struct SnapshotMessage {
pub kind: MessageType,
pub content: CompactString,
pub embeds: Vec<Embed>,
pub attachments: Vec<Attachment>,
pub timestamp: Timestamp,
pub edited_timestamp: Option<Timestamp>,
pub flags: MessageFlags,
pub mentions: Vec<User>,
pub mention_roles: Vec<RoleId>,
pub stickers: Vec<Sticker>,
pub sticker_items: Vec<StickerItem>,
pub components: Vec<Component>,
}Expand description
The fields of a forwarded message kept in a MessageSnapshot: a partial Message
(D-051).
discord.js counterpart: APIMessageSnapshotFields (discord-api-types).
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.kind: MessageTypeThe kind of message.
content: CompactStringThe text content.
embeds: Vec<Embed>The embeds.
attachments: Vec<Attachment>The attached files.
timestamp: TimestampWhen the message was sent.
edited_timestamp: Option<Timestamp>When the message was last edited, if ever.
flags: MessageFlagsThe message’s flags.
mentions: Vec<User>The users mentioned in the message.
mention_roles: Vec<RoleId>The roles mentioned in the message.
stickers: Vec<Sticker>The full stickers. Deprecated by Discord in favor of
sticker_items.
sticker_items: Vec<StickerItem>The stickers.
components: Vec<Component>The components.
Trait Implementations§
Source§impl Clone for SnapshotMessage
impl Clone for SnapshotMessage
Source§impl Debug for SnapshotMessage
impl Debug for SnapshotMessage
Source§impl<'de> Deserialize<'de> for SnapshotMessage
impl<'de> Deserialize<'de> for SnapshotMessage
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 PartialEq for SnapshotMessage
impl PartialEq for SnapshotMessage
Source§impl Serialize for SnapshotMessage
impl Serialize for SnapshotMessage
impl StructuralPartialEq for SnapshotMessage
Auto Trait Implementations§
impl Forget for SnapshotMessage
impl Freeze for SnapshotMessage
impl Move for SnapshotMessage
impl RefUnwindSafe for SnapshotMessage
impl Send for SnapshotMessage
impl Sync for SnapshotMessage
impl Unpin for SnapshotMessage
impl UnsafeUnpin for SnapshotMessage
impl UnwindSafe for SnapshotMessage
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