pub struct Embed {Show 13 fields
pub title: Option<String>,
pub kind: Option<String>,
pub description: Option<String>,
pub url: Option<String>,
pub timestamp: Option<String>,
pub color: Option<u64>,
pub footer: Option<EmbedFooter>,
pub image: Option<EmbedImage>,
pub thumbnail: Option<EmbedThumbnail>,
pub video: Option<EmbedVideo>,
pub provider: Option<EmbedProvider>,
pub author: Option<EmbedAuthor>,
pub fields: Vec<EmbedField>,
}Fields§
§title: Option<String>Title of the embed
kind: Option<String>§description: Option<String>§url: Option<String>§timestamp: Option<String>§color: Option<u64>§image: Option<EmbedImage>§thumbnail: Option<EmbedThumbnail>§video: Option<EmbedVideo>§provider: Option<EmbedProvider>§fields: Vec<EmbedField>Implementations§
Source§impl Embed
impl Embed
pub fn new() -> Self
pub fn set_title(&mut self, title: impl Into<String>) -> &mut Self
pub fn set_description(&mut self, description: impl Into<String>) -> &mut Self
pub fn set_url(&mut self, url: impl Into<String>) -> &mut Self
pub fn set_color(&mut self, _color: u64) -> &mut Self
pub fn add_image(&mut self, image: EmbedImage) -> &mut Self
pub fn add_thumbnail(&mut self, thumbnail: EmbedThumbnail) -> &mut Self
pub fn add_video(&mut self, video: EmbedVideo) -> &mut Self
pub fn set_provider(&mut self, provider: EmbedProvider) -> &mut Self
pub fn add_field( &mut self, name: impl Into<String>, value: impl Into<String>, inline: bool, ) -> &mut Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Embed
impl<'de> Deserialize<'de> for Embed
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
Auto Trait Implementations§
impl Freeze for Embed
impl RefUnwindSafe for Embed
impl Send for Embed
impl Sync for Embed
impl Unpin for Embed
impl UnsafeUnpin for Embed
impl UnwindSafe for Embed
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