pub struct CreateMessage<'a> {
pub content: Option<TitanString<'a>>,
pub tts: Option<bool>,
pub embeds: Option<Vec<Embed<'a>>>,
pub components: Option<Vec<Component<'a>>>,
pub flags: Option<u64>,
pub message_reference: Option<MessageReference>,
pub files: Vec<FileUpload>,
}Expand description
Payload to create a message.
Fields§
§content: Option<TitanString<'a>>Message content.
tts: Option<bool>Pass true if sending a TTS message.
embeds: Option<Vec<Embed<'a>>>Embeds to include.
components: Option<Vec<Component<'a>>>Components to include.
flags: Option<u64>Message flags (SUPPRESS_EMBEDS, SUPPRESS_NOTIFICATIONS).
message_reference: Option<MessageReference>Message reference (reply).
files: Vec<FileUpload>Files to upload (not serialized to JSON, used by HTTP client).
Implementations§
Trait Implementations§
Source§impl<'a> Clone for CreateMessage<'a>
impl<'a> Clone for CreateMessage<'a>
Source§fn clone(&self) -> CreateMessage<'a>
fn clone(&self) -> CreateMessage<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for CreateMessage<'a>
impl<'a> Debug for CreateMessage<'a>
Source§impl<'a> Default for CreateMessage<'a>
impl<'a> Default for CreateMessage<'a>
Source§fn default() -> CreateMessage<'a>
fn default() -> CreateMessage<'a>
Returns the “default value” for a type. Read more
Source§impl<'de: 'a, 'a> Deserialize<'de> for CreateMessage<'a>
impl<'de: 'a, 'a> Deserialize<'de> for CreateMessage<'a>
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<'a> From<MessageBuilder<'a>> for CreateMessage<'a>
impl<'a> From<MessageBuilder<'a>> for CreateMessage<'a>
Source§fn from(builder: MessageBuilder<'a>) -> Self
fn from(builder: MessageBuilder<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for CreateMessage<'a>
impl<'a> RefUnwindSafe for CreateMessage<'a>
impl<'a> Send for CreateMessage<'a>
impl<'a> Sync for CreateMessage<'a>
impl<'a> Unpin for CreateMessage<'a>
impl<'a> UnwindSafe for CreateMessage<'a>
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