[−][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<String>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.
Trait Implementations
impl MessageResponse for Embed[src]
fn to_message(self) -> CreateMessage[src]
impl Default for Embed[src]
impl Clone for Embed[src]
fn clone(&self) -> Embed[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
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, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> From for T[src]
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>,