pub struct Message {Show 29 fields
pub activity: Option<MessageActivity>,
pub application: Option<MessageApplication>,
pub application_id: Option<Id<ApplicationMarker>>,
pub attachments: Vec<Attachment>,
pub author: User,
pub channel_id: Id<ChannelMarker>,
pub components: Vec<Component>,
pub content: String,
pub edited_timestamp: Option<Timestamp>,
pub embeds: Vec<Embed>,
pub flags: Option<MessageFlags>,
pub guild_id: Option<Id<GuildMarker>>,
pub id: Id<MessageMarker>,
pub interaction: Option<MessageInteraction>,
pub kind: MessageType,
pub member: Option<PartialMember>,
pub mention_channels: Vec<ChannelMention>,
pub mention_everyone: bool,
pub mention_roles: Vec<Id<RoleMarker>>,
pub mentions: Vec<Mention>,
pub pinned: bool,
pub reactions: Vec<MessageReaction>,
pub reference: Option<MessageReference>,
pub referenced_message: Option<Box<Message>>,
pub sticker_items: Vec<MessageSticker>,
pub timestamp: Timestamp,
pub thread: Option<Channel>,
pub tts: bool,
pub webhook_id: Option<Id<WebhookMarker>>,
}
Fields
activity: Option<MessageActivity>
application: Option<MessageApplication>
application_id: Option<Id<ApplicationMarker>>
Associated application’s ID.
Sent if the message is a response to an Interaction.
attachments: Vec<Attachment>
channel_id: Id<ChannelMarker>
components: Vec<Component>
List of provided message components.
content: String
edited_timestamp: Option<Timestamp>
embeds: Vec<Embed>
flags: Option<MessageFlags>
guild_id: Option<Id<GuildMarker>>
id: Id<MessageMarker>
interaction: Option<MessageInteraction>
kind: MessageType
member: Option<PartialMember>
mention_channels: Vec<ChannelMention>
mention_everyone: bool
mention_roles: Vec<Id<RoleMarker>>
mentions: Vec<Mention>
pinned: bool
reactions: Vec<MessageReaction>
reference: Option<MessageReference>
Reference data sent with crossposted messages and replies.
referenced_message: Option<Box<Message>>
The message associated with the reference.
sticker_items: Vec<MessageSticker>
Stickers within the message.
timestamp: Timestamp
Timestamp of when the message was created.
thread: Option<Channel>
tts: bool
webhook_id: Option<Id<WebhookMarker>>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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
impl Eq for Message
impl StructuralEq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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