pub struct EmbedFooterBuilder(/* private fields */);
Available on crate feature
builder
only.Expand description
Create an embed footer with a builder.
This can be passed into EmbedBuilder::footer
.
Implementations§
Sourcepub fn new(text: impl Into<String>) -> Self
pub fn new(text: impl Into<String>) -> Self
Create a new embed footer builder.
Refer to FOOTER_TEXT_LENGTH
for the maximum number of UTF-16 code
points that can be in a footer’s text.
Sourcepub fn icon_url(self, image_source: ImageSource) -> Self
pub fn icon_url(self, image_source: ImageSource) -> Self
Add a footer icon.
§Examples
Create a footer by Twilight with a URL to an image of its logo:
use twilight_util::builder::embed::{EmbedFooterBuilder, ImageSource};
let icon_url =
ImageSource::url("https://raw.githubusercontent.com/twilight-rs/twilight/main/logo.png")?;
let footer = EmbedFooterBuilder::new("Twilight")
.icon_url(icon_url)
.build();
Trait Implementations§
Source§fn clone(&self) -> EmbedFooterBuilder
fn clone(&self) -> EmbedFooterBuilder
Returns a copy 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§fn from(builder: EmbedFooterBuilder) -> Self
fn from(builder: EmbedFooterBuilder) -> Self
Convert an embed footer builder into an embed footer.
This is equivalent to calling EmbedFooterBuilder::build
.
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