Struct twilight_embed_builder::EmbedFieldBuilder
source · [−]pub struct EmbedFieldBuilder(_);
use twilight_util::builder::embed
Expand description
Create an embed field with a builder.
This can be passed into EmbedBuilder::field
.
Fields are not inlined by default. Use inline
to inline a field.
Implementations
sourceimpl EmbedFieldBuilder
impl EmbedFieldBuilder
sourcepub fn new(name: impl Into<String>, value: impl Into<String>) -> Self
👎 Deprecated since 0.10.1: use twilight_util::builder::embed
pub fn new(name: impl Into<String>, value: impl Into<String>) -> Self
use twilight_util::builder::embed
Create a new default embed field builder.
Refer to EmbedBuilder::FIELD_NAME_LENGTH_LIMIT
for the maximum
number of UTF-16 code points that can be in a field name.
Refer to EmbedBuilder::FIELD_VALUE_LENGTH_LIMIT
for the maximum
number of UTF-16 code points that can be in a field value.
sourcepub fn build(self) -> EmbedField
👎 Deprecated since 0.10.1: use twilight_util::builder::embed
pub fn build(self) -> EmbedField
use twilight_util::builder::embed
Build into an embed field.
Trait Implementations
sourceimpl Clone for EmbedFieldBuilder
impl Clone for EmbedFieldBuilder
sourcefn clone(&self) -> EmbedFieldBuilder
fn clone(&self) -> EmbedFieldBuilder
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
sourceimpl Debug for EmbedFieldBuilder
impl Debug for EmbedFieldBuilder
sourceimpl From<EmbedFieldBuilder> for EmbedField
impl From<EmbedFieldBuilder> for EmbedField
sourcefn from(builder: EmbedFieldBuilder) -> Self
fn from(builder: EmbedFieldBuilder) -> Self
Convert an embed field builder into an embed field.
This is equivalent to calling EmbedFieldBuilder::build
.
sourceimpl PartialEq<EmbedFieldBuilder> for EmbedFieldBuilder
impl PartialEq<EmbedFieldBuilder> for EmbedFieldBuilder
sourcefn eq(&self, other: &EmbedFieldBuilder) -> bool
fn eq(&self, other: &EmbedFieldBuilder) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &EmbedFieldBuilder) -> bool
fn ne(&self, other: &EmbedFieldBuilder) -> bool
This method tests for !=
.
impl Eq for EmbedFieldBuilder
impl StructuralEq for EmbedFieldBuilder
impl StructuralPartialEq for EmbedFieldBuilder
Auto Trait Implementations
impl RefUnwindSafe for EmbedFieldBuilder
impl Send for EmbedFieldBuilder
impl Sync for EmbedFieldBuilder
impl Unpin for EmbedFieldBuilder
impl UnwindSafe for EmbedFieldBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
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>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
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