#[non_exhaustive]pub enum ReactionType {
Emoji(ReactionTypeEmojiData),
CustomEmoji(ReactionTypeCustomEmojiData),
Paid(ReactionTypePaidData),
}Expand description
Polymorphic reaction type, selected by the "type" field in the JSON.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Emoji(ReactionTypeEmojiData)
A reaction using a standard emoji.
CustomEmoji(ReactionTypeCustomEmojiData)
A reaction using a custom emoji.
Paid(ReactionTypePaidData)
A paid reaction.
Implementations§
Source§impl ReactionType
impl ReactionType
Sourcepub fn emoji(emoji: impl Into<String>) -> ReactionType
pub fn emoji(emoji: impl Into<String>) -> ReactionType
Create a standard emoji reaction.
Sourcepub fn custom_emoji(custom_emoji_id: impl Into<String>) -> ReactionType
pub fn custom_emoji(custom_emoji_id: impl Into<String>) -> ReactionType
Create a custom emoji reaction.
Sourcepub fn paid() -> ReactionType
pub fn paid() -> ReactionType
Create a paid reaction.
Trait Implementations§
Source§impl Clone for ReactionType
impl Clone for ReactionType
Source§fn clone(&self) -> ReactionType
fn clone(&self) -> ReactionType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReactionType
impl Debug for ReactionType
Source§impl<'de> Deserialize<'de> for ReactionType
impl<'de> Deserialize<'de> for ReactionType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ReactionType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ReactionType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ReactionType
impl PartialEq for ReactionType
Source§impl Serialize for ReactionType
impl Serialize for ReactionType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ReactionType
Auto Trait Implementations§
impl Freeze for ReactionType
impl RefUnwindSafe for ReactionType
impl Send for ReactionType
impl Sync for ReactionType
impl Unpin for ReactionType
impl UnsafeUnpin for ReactionType
impl UnwindSafe for ReactionType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more