#[non_exhaustive]pub struct EmbedFooter {
pub text: CompactString,
pub icon_url: Option<CompactString>,
pub proxy_icon_url: Option<CompactString>,
}Expand description
The footer of an embed.
discord.js counterpart: APIEmbedFooter (discord-api-types).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: CompactStringThe footer text (max 2048 characters).
icon_url: Option<CompactString>The URL of the footer icon (http(s) or attachment://).
proxy_icon_url: Option<CompactString>The URL of the icon through Discord’s media proxy.
Implementations§
Sourcepub fn new(text: impl Into<CompactString>) -> Self
pub fn new(text: impl Into<CompactString>) -> Self
Creates a footer with text and no icon.
Nothing is validated; djs-builders checks Discord’s limits.
discord.js counterpart: EmbedFooterOptions (@discordjs/builders).
§Examples
use djs_model::message::EmbedFooter;
let footer = EmbedFooter::new("Page 1 of 3");
assert_eq!(footer.text, "Page 1 of 3");
assert_eq!(footer.icon_url, None);Trait Implementations§
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§
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