[−][src]Struct spectacles_model::message::Embed
Represents a Message Embed being sent.
Fields
title: Option<String>
The title of the embed.
kind: Option<String>
The type of embed.
description: Option<String>
The description of the embed.
url: Option<String>
The URL of the embed.
timestamp: Option<DateTime<Utc>>
The timestamp of the embed.
color: Option<i32>
The color of the embed.
Information about the embed's footer.
image: Option<EmbedImage>
Information about the embed's image.
thumbnail: Option<EmbedThumbnail>
Information about the embed's thumbnail.
video: Option<EmbedVideo>
Information about an embed's video, if applicable.
provider: Option<EmbedProvider>
Information about an embed's provider if applicable.
Information about the embed's author.
fields: Vec<EmbedField>
Information about the embed's fields.
Methods
impl Embed
[src]
pub fn new() -> Self
[src]
pub fn set_title(self, text: impl Into<String>) -> Self
[src]
Sets the title for this embed.
pub fn set_description(self, text: impl Into<String>) -> Self
[src]
Sets the description of this embed.
pub fn set_color(self, code: i32) -> Self
[src]
Sets the color of this embed.
pub fn add_field<F: FnOnce(EmbedField) -> EmbedField>(self, builder: F) -> Self
[src]
Adds a field to this embed.
pub fn set_author<F>(self, author: F) -> Self where
F: FnOnce(EmbedAuthor) -> EmbedAuthor,
[src]
F: FnOnce(EmbedAuthor) -> EmbedAuthor,
Sets the author of this embed.
pub fn set_footer<F>(self, footer: F) -> Self where
F: FnOnce(EmbedFooter) -> EmbedFooter,
[src]
F: FnOnce(EmbedFooter) -> EmbedFooter,
Sets the footer of this embed.
pub fn set_thumbnail<T>(self, thumb: T) -> Self where
T: FnOnce(EmbedThumbnail) -> EmbedThumbnail,
[src]
T: FnOnce(EmbedThumbnail) -> EmbedThumbnail,
Adds a thumbnail to this embed.
pub fn set_image<F>(self, img: F) -> Self where
F: FnOnce(EmbedImage) -> EmbedImage,
[src]
F: FnOnce(EmbedImage) -> EmbedImage,
Adds an image to this embed.
pub fn set_current_timestamp(self) -> Self
[src]
pub fn set_timestamp(self, time: DateTime<Utc>) -> Self
[src]
Trait Implementations
impl MessageResponse for Embed
[src]
fn as_message(self) -> CreateMessageOptions
[src]
impl Clone for Embed
[src]
fn clone(&self) -> Embed
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Embed
[src]
impl Debug for Embed
[src]
impl Serialize for Embed
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Embed
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,