pub struct EmbedFooterBuilder(_);
use twilight_util::builder::embed
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
👎 Deprecated since 0.10.1: use twilight_util::builder::embed
pub fn new(text: impl Into<String>) -> Self
use twilight_util::builder::embed
Create a new default embed footer builder.
Refer to EmbedBuilder::FOOTER_TEXT_LENGTH_LIMIT
for the maximum
number of UTF-16 code points that can be in a footer’s text.
sourcepub fn build(self) -> EmbedFooter
👎 Deprecated since 0.10.1: use twilight_util::builder::embed
pub fn build(self) -> EmbedFooter
use twilight_util::builder::embed
Build into an embed footer.
sourcepub fn icon_url(self, image_source: ImageSource) -> Self
👎 Deprecated since 0.10.1: use twilight_util::builder::embed
pub fn icon_url(self, image_source: ImageSource) -> Self
use twilight_util::builder::embed
Add a footer icon.
Examples
Create a footer by Twilight with a URL to an image of its logo:
use twilight_embed_builder::{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
sourcefn clone(&self) -> EmbedFooterBuilder
fn clone(&self) -> EmbedFooterBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourcefn 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
.
sourcefn eq(&self, other: &EmbedFooterBuilder) -> bool
fn eq(&self, other: &EmbedFooterBuilder) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &EmbedFooterBuilder) -> bool
fn ne(&self, other: &EmbedFooterBuilder) -> bool
This method tests for !=
.
Auto Trait Implementations
Blanket Implementations
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more