Struct twilight_model::channel::message::Mention [−][src]
pub struct Mention {
pub avatar: Option<String>,
pub bot: bool,
pub discriminator: u16,
pub id: UserId,
pub member: Option<PartialMember>,
pub name: String,
pub public_flags: UserFlags,
}Expand description
Mention of a user in a message.
Fields
avatar: Option<String>Hash of the user’s avatar, if any.
bot: boolWhether the user is a bot.
discriminator: u16Discriminator used to differentiate people with the same username.
serde
The discriminator field can be deserialized from either a string or an integer. The field will always serialize into a string due to that being the type Discord’s API uses.
id: UserIdUnique ID of the user.
member: Option<PartialMember>Member object for the user in the guild, if available.
name: StringUsername of the user.
public_flags: UserFlagsPublic flags on the user’s account.
Implementations
Create a Display formatter for a user discriminator.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Mention
impl UnwindSafe for Mention
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
