[−][src]Trait twilight_mention::fmt::Mention
Mention a resource, such as an emoji or user.
This will create a mention that will link to a user if it exists.
Look at the implementations list to see what you can mention.
Examples
Mention a ChannelId
:
use twilight_mention::Mention; use twilight_model::id::ChannelId; assert_eq!("<#123>", ChannelId(123).mention().to_string());
Required methods
fn mention(&self) -> MentionFormat<T>
Mention a resource by using its ID.
Implementations on Foreign Types
impl Mention<ChannelId> for ChannelId
[src]
Mention a channel ID. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl<'_> Mention<ChannelId> for &'_ ChannelId
[src]
Mention a channel ID. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl Mention<ChannelId> for CategoryChannel
[src]
Mention a guild category channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl<'_> Mention<ChannelId> for &'_ CategoryChannel
[src]
Mention a guild category channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl Mention<ChannelId> for Channel
[src]
Mention a channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl<'_> Mention<ChannelId> for &'_ Channel
[src]
Mention a channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl Mention<UserId> for CurrentUser
[src]
Mention the current user. This will format as <@ID>
.
fn mention(&self) -> MentionFormat<UserId>
[src]
impl<'_> Mention<UserId> for &'_ CurrentUser
[src]
Mention the current user. This will format as <@ID>
.
fn mention(&self) -> MentionFormat<UserId>
[src]
impl Mention<EmojiId> for EmojiId
[src]
Mention an emoji. This will format as <:emoji:ID>
.
fn mention(&self) -> MentionFormat<EmojiId>
[src]
impl<'_> Mention<EmojiId> for &'_ EmojiId
[src]
Mention an emoji. This will format as <:emoji:ID>
.
fn mention(&self) -> MentionFormat<EmojiId>
[src]
impl Mention<EmojiId> for Emoji
[src]
Mention an emoji. This will format as <:emoji:ID>
.
fn mention(&self) -> MentionFormat<EmojiId>
[src]
impl<'_> Mention<EmojiId> for &'_ Emoji
[src]
Mention an emoji. This will format as <:emoji:ID>
.
fn mention(&self) -> MentionFormat<EmojiId>
[src]
impl Mention<ChannelId> for Group
[src]
Mention a group. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl<'_> Mention<ChannelId> for &'_ Group
[src]
Mention a group. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl Mention<ChannelId> for GuildChannel
[src]
Mention a guild channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl<'_> Mention<ChannelId> for &'_ GuildChannel
[src]
Mention a guild channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl Mention<UserId> for Member
[src]
Mention a member's user. This will format as <@ID>
.
fn mention(&self) -> MentionFormat<UserId>
[src]
impl<'_> Mention<UserId> for &'_ Member
[src]
Mention a member's user. This will format as <@ID>
.
fn mention(&self) -> MentionFormat<UserId>
[src]
impl Mention<ChannelId> for PrivateChannel
[src]
Mention a private channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl<'_> Mention<ChannelId> for &'_ PrivateChannel
[src]
Mention a private channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl Mention<RoleId> for RoleId
[src]
Mention a role ID. This will format as <@&ID>
.
fn mention(&self) -> MentionFormat<RoleId>
[src]
impl<'_> Mention<RoleId> for &'_ RoleId
[src]
Mention a role ID. This will format as <@&ID>
.
fn mention(&self) -> MentionFormat<RoleId>
[src]
impl Mention<RoleId> for Role
[src]
Mention a role ID. This will format as <@&ID>
.
fn mention(&self) -> MentionFormat<RoleId>
[src]
impl<'_> Mention<RoleId> for &'_ Role
[src]
Mention a role ID. This will format as <@&ID>
.
fn mention(&self) -> MentionFormat<RoleId>
[src]
impl Mention<ChannelId> for TextChannel
[src]
Mention a guild text channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl<'_> Mention<ChannelId> for &'_ TextChannel
[src]
Mention a guild text channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl Mention<UserId> for UserId
[src]
Mention a user ID. This will format as <&ID>
.
fn mention(&self) -> MentionFormat<UserId>
[src]
impl<'_> Mention<UserId> for &'_ UserId
[src]
Mention a user ID. This will format as <&ID>
.
fn mention(&self) -> MentionFormat<UserId>
[src]
impl Mention<UserId> for User
[src]
Mention a user. This will format as <&ID>
.
fn mention(&self) -> MentionFormat<UserId>
[src]
impl<'_> Mention<UserId> for &'_ User
[src]
Mention a user. This will format as <&ID>
.
fn mention(&self) -> MentionFormat<UserId>
[src]
impl Mention<ChannelId> for VoiceChannel
[src]
Mention a guild voice channel. This will format as <#ID>
.
fn mention(&self) -> MentionFormat<ChannelId>
[src]
impl<'_> Mention<ChannelId> for &'_ VoiceChannel
[src]
Mention a guild voice channel. This will format as <#ID>
.