Struct twilight_util::builder::embed::EmbedFieldBuilder
source · [−]pub struct EmbedFieldBuilder(_);Available on crate feature
builder only.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
pub fn new(name: impl Into<String>, value: impl Into<String>) -> Self
Create a new embed field builder.
Refer to FIELD_NAME_LENGTH for the maximum number of UTF-16 code
points that can be in a field name.
Refer to FIELD_VALUE_LENGTH for the maximum number of UTF-16 code
points that can be in a field value.
sourcepub fn build(self) -> EmbedField
pub fn build(self) -> EmbedField
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 moresourceimpl 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
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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