[][src]Struct twilight_http::request::channel::message::allowed_mentions::AllowedMentionsBuilder

pub struct AllowedMentionsBuilder<'a, E, U, R> { /* fields omitted */ }

A builder for allowed mentions.

Example

use twilight_http::request::channel::message::allowed_mentions::AllowedMentionsBuilder;
let mut allowed_mentions = AllowedMentionsBuilder::new()
    .parse_everyone()
    .parse_users()
    .build_solo();

Implementations

impl<'a> AllowedMentionsBuilder<'a, Unspecified, Unspecified, Unspecified>[src]

pub fn new() -> Self[src]

Create the builder.

impl<'a, U, R> AllowedMentionsBuilder<'a, Unspecified, U, R>[src]

pub fn parse_everyone(self) -> AllowedMentionsBuilder<'a, Parsed, U, R>[src]

Enable parsing for the @everyone and @here tags.

impl<'a, E, R> AllowedMentionsBuilder<'a, E, Unspecified, R>[src]

pub fn parse_users(self) -> AllowedMentionsBuilder<'a, E, Parsed, R>[src]

Enable parsing for all user tags.

pub fn parse_specific_users(
    self,
    u: impl IntoIterator<Item = UserId>
) -> AllowedMentionsBuilder<'a, E, ExplicitUser, R>
[src]

Enable parsing for specific user tags.

impl<'a, E, U> AllowedMentionsBuilder<'a, E, U, Unspecified>[src]

pub fn parse_roles(self) -> AllowedMentionsBuilder<'a, E, U, Parsed>[src]

Enable parsing for all role tags.

pub fn parse_specific_roles(
    self,
    r: impl IntoIterator<Item = RoleId>
) -> AllowedMentionsBuilder<'a, E, U, ExplicitRole>
[src]

Enable parsing for specific role tags.

impl<'a, E, U> AllowedMentionsBuilder<'a, E, U, ExplicitRole>[src]

pub fn parse_specific_roles(self, r: impl IntoIterator<Item = RoleId>) -> Self[src]

Enable parsing for more specific role tags.

If there are already some specific RoleIds in this builder, extend them with the content of r.

impl<'a, E, R> AllowedMentionsBuilder<'a, E, ExplicitUser, R>[src]

pub fn parse_specific_users(self, u: impl IntoIterator<Item = UserId>) -> Self[src]

Enable parsing for more specific user tags.

If there are already some specific UserIds in this builder, extend them with the content of u.

impl<'a, E: VisitAllowedMentionsEveryone, U: VisitAllowedMentionsUsers, R: VisitAllowedMentionsRoles> AllowedMentionsBuilder<'a, E, U, R>[src]

pub fn build(self) -> CreateMessage<'a>

Notable traits for CreateMessage<'_>

impl<'_> Future for CreateMessage<'_> type Output = Result<Message>;
[src]

Return a CreateMessage struct with the specified allowed_mentions.

pub fn build_solo(self) -> AllowedMentions[src]

Trait Implementations

impl<'a> Default for AllowedMentionsBuilder<'a, Unspecified, Unspecified, Unspecified>[src]

Auto Trait Implementations

impl<'a, E, U, R> !RefUnwindSafe for AllowedMentionsBuilder<'a, E, U, R>

impl<'a, E, U, R> Send for AllowedMentionsBuilder<'a, E, U, R> where
    E: Send,
    R: Send,
    U: Send

impl<'a, E, U, R> !Sync for AllowedMentionsBuilder<'a, E, U, R>

impl<'a, E, U, R> Unpin for AllowedMentionsBuilder<'a, E, U, R> where
    E: Unpin,
    R: Unpin,
    U: Unpin

impl<'a, E, U, R> !UnwindSafe for AllowedMentionsBuilder<'a, E, U, R>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.