[−][src]Struct twilight_embed_builder::author::EmbedAuthorBuilder
Create an embed author with a builder.
This can be passed into EmbedBuilder::author
.
Implementations
impl EmbedAuthorBuilder
[src]
pub const NAME_LENGTH_LIMIT: usize
[src]
The maximum number of UTF-16 code points that can be in an author name.
This is used by name
.
pub fn new() -> Self
[src]
Create a new default embed author builder.
#[must_use = "should be used as part of an embed builder"]pub fn build(self) -> EmbedAuthor
[src]
Build into an embed author.
pub fn icon_url(self, image_source: ImageSource) -> Self
[src]
Add an author icon.
pub fn name(self, name: impl Into<String>) -> Result<Self, EmbedAuthorNameError>
[src]
The author's name.
Refer to NAME_LENGTH_LIMIT
for the maximum number of UTF-16
code points that can be in a description.
Errors
Returns EmbedAuthorNameError::Empty
if the provided name is empty.
Returns EmbedAuthorNameError::TooLong
if the provided name is longer
than the maximum number of code points.
pub fn url(self, url: impl Into<String>) -> Self
[src]
The author's url.
Trait Implementations
impl Clone for EmbedAuthorBuilder
[src]
fn clone(&self) -> EmbedAuthorBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for EmbedAuthorBuilder
[src]
impl Default for EmbedAuthorBuilder
[src]
impl Eq for EmbedAuthorBuilder
[src]
impl From<EmbedAuthorBuilder> for EmbedAuthor
[src]
fn from(builder: EmbedAuthorBuilder) -> Self
[src]
Convert an embed author builder into an embed author.
This is equivalent to calling EmbedAuthorBuilder::build
.
impl PartialEq<EmbedAuthorBuilder> for EmbedAuthorBuilder
[src]
fn eq(&self, other: &EmbedAuthorBuilder) -> bool
[src]
fn ne(&self, other: &EmbedAuthorBuilder) -> bool
[src]
impl StructuralEq for EmbedAuthorBuilder
[src]
impl StructuralPartialEq for EmbedAuthorBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for EmbedAuthorBuilder
impl Send for EmbedAuthorBuilder
impl Sync for EmbedAuthorBuilder
impl Unpin for EmbedAuthorBuilder
impl UnwindSafe for EmbedAuthorBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,