[][src]Struct twilight_mention::fmt::MentionFormat

pub struct MentionFormat<T>(_);

Formatter to mention a resource that implements std::fmt::Display.

Examples

Mention a UserId:

use twilight_mention::Mention;
use twilight_model::id::UserId;

assert_eq!("<@123>", UserId(123).mention().to_string());

Trait Implementations

impl<T: Clone> Clone for MentionFormat<T>[src]

impl<T: Copy> Copy for MentionFormat<T>[src]

impl<T: Debug> Debug for MentionFormat<T>[src]

impl Display for MentionFormat<ChannelId>[src]

Mention a channel. This will format as <#ID>.

impl Display for MentionFormat<EmojiId>[src]

Mention an emoji. This will format as <:emoji:ID>.

impl Display for MentionFormat<RoleId>[src]

Mention a role. This will format as <@&ID>.

impl Display for MentionFormat<UserId>[src]

Mention a user. This will format as <@ID>.

impl<T: Eq> Eq for MentionFormat<T>[src]

impl<T: PartialEq> PartialEq<MentionFormat<T>> for MentionFormat<T>[src]

impl<T> StructuralEq for MentionFormat<T>[src]

impl<T> StructuralPartialEq for MentionFormat<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for MentionFormat<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for MentionFormat<T> where
    T: Send
[src]

impl<T> Sync for MentionFormat<T> where
    T: Sync
[src]

impl<T> Unpin for MentionFormat<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for MentionFormat<T> where
    T: UnwindSafe
[src]

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.