Struct twilight_model::channel::message::allowed_mentions::AllowedMentions
source · [−]pub struct AllowedMentions {
pub parse: Vec<ParseTypes>,
pub users: Vec<Id<UserMarker>>,
pub roles: Vec<Id<RoleMarker>>,
pub replied_user: bool,
}
Expand description
Allows for more granular control over mentions.
Validates against the message content to avoid phantom pings, but you must
still have e.g. @everyone
in the message content to ping everyone.
Fields
parse: Vec<ParseTypes>
List of allowed ParseTypes
.
users: Vec<Id<UserMarker>>
List of Id<UserMarker>
to mention.
roles: Vec<Id<RoleMarker>>
List of Id<RoleMarker>
to mention.
replied_user: bool
For replies, whether to mention the message author being replied to.
Defaults to false.
Implementations
sourceimpl AllowedMentions
impl AllowedMentions
sourcepub const fn builder() -> AllowedMentionsBuilder
pub const fn builder() -> AllowedMentionsBuilder
Create a new AllowedMentionsBuilder
.
Trait Implementations
sourceimpl Clone for AllowedMentions
impl Clone for AllowedMentions
sourcefn clone(&self) -> AllowedMentions
fn clone(&self) -> AllowedMentions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AllowedMentions
impl Debug for AllowedMentions
sourceimpl Default for AllowedMentions
impl Default for AllowedMentions
sourcefn default() -> AllowedMentions
fn default() -> AllowedMentions
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for AllowedMentions
impl<'de> Deserialize<'de> for AllowedMentions
sourcefn 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
sourceimpl Hash for AllowedMentions
impl Hash for AllowedMentions
sourceimpl PartialEq<AllowedMentions> for AllowedMentions
impl PartialEq<AllowedMentions> for AllowedMentions
sourcefn eq(&self, other: &AllowedMentions) -> bool
fn eq(&self, other: &AllowedMentions) -> bool
sourceimpl Serialize for AllowedMentions
impl Serialize for AllowedMentions
impl Eq for AllowedMentions
impl StructuralEq for AllowedMentions
impl StructuralPartialEq for AllowedMentions
Auto Trait Implementations
impl RefUnwindSafe for AllowedMentions
impl Send for AllowedMentions
impl Sync for AllowedMentions
impl Unpin for AllowedMentions
impl UnwindSafe for AllowedMentions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more