[−][src]Enum serenity::model::channel::ReactionType
The type of a Reaction
sent.
Variants
Custom
Fields of Custom
Unicode(String)
A reaction with a twemoji.
Methods
impl ReactionType
[src]
pub fn as_data(&self) -> String
[src]
Creates a data-esque display of the type. This is not very useful for displaying, as the primary client can not render it, but can be useful for debugging.
Note: This is mainly for use internally. There is otherwise most likely little use for it.
Trait Implementations
impl PartialEq<ReactionType> for ReactionType
[src]
fn eq(&self, other: &ReactionType) -> bool
[src]
fn ne(&self, other: &ReactionType) -> bool
[src]
impl From<char> for ReactionType
[src]
fn from(ch: char) -> ReactionType
[src]
Creates a ReactionType
from a char
.
Examples
Reacting to a message with an apple:
message.react('🍎')?;
impl From<Emoji> for ReactionType
[src]
fn from(emoji: Emoji) -> ReactionType
[src]
impl From<EmojiId> for ReactionType
[src]
fn from(emoji_id: EmojiId) -> ReactionType
[src]
impl From<EmojiIdentifier> for ReactionType
[src]
fn from(emoji_id: EmojiIdentifier) -> ReactionType
[src]
impl From<String> for ReactionType
[src]
fn from(unicode: String) -> ReactionType
[src]
impl<'a> From<&'a str> for ReactionType
[src]
fn from(unicode: &str) -> ReactionType
[src]
Creates a ReactionType
from a string slice.
Examples
Creating a ReactionType
from a 🍎
, modeling a similar API as the
rest of the library:
use serenity::model::channel::ReactionType; fn foo<R: Into<ReactionType>>(bar: R) { println!("{:?}", bar.into()); } foo("🍎");
impl Clone for ReactionType
[src]
fn clone(&self) -> ReactionType
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for ReactionType
[src]
impl Display for ReactionType
[src]
fn fmt(&self, f: &mut Formatter) -> FmtResult
[src]
Formats the reaction type, displaying the associated emoji in a way that clients can understand.
If the type is a custom emoji, then refer to the documentation for emoji's formatter on how this is displayed. Otherwise, if the type is a unicode, then the inner unicode is displayed.
impl Debug for ReactionType
[src]
impl Hash for ReactionType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl FromStr for ReactionType
[src]
type Err = NeverFails
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Serialize for ReactionType
[src]
impl<'de> Deserialize<'de> for ReactionType
[src]
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> StdResult<Self, D::Error>
[src]
deserializer: D
) -> StdResult<Self, D::Error>
Auto Trait Implementations
impl Send for ReactionType
impl Sync for ReactionType
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Erased for T
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> DebugAny for T where
T: Any + Debug,
[src]
T: Any + Debug,
impl<T> CloneAny for T where
T: Clone + Any,
[src]
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
[src]
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
[src]
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
[src]
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Send + Sync> where
T: Send + Sync,
[src]
T: Send + Sync,
impl<T> UnsafeAny for T where
T: Any,
T: Any,