Enum twilight_http::request::channel::reaction::RequestReactionType
source · [−]pub enum RequestReactionType<'a> {
Custom {
id: Id<EmojiMarker>,
name: Option<&'a str>,
},
Unicode {
name: &'a str,
},
}
Expand description
Handle a reaction of either a custom or unicode emoji.
Variants
Custom
Fields
id: Id<EmojiMarker>
ID of the custom emoji.
Reaction of a custom emoji.
Unicode
Fields
name: &'a str
Unicode emoji.
Reaction of a unicode emoji, such as “🌈”.
Trait Implementations
sourceimpl<'a> Clone for RequestReactionType<'a>
impl<'a> Clone for RequestReactionType<'a>
sourcefn clone(&self) -> RequestReactionType<'a>
fn clone(&self) -> RequestReactionType<'a>
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 more
sourceimpl<'a> Debug for RequestReactionType<'a>
impl<'a> Debug for RequestReactionType<'a>
sourceimpl Display for RequestReactionType<'_>
impl Display for RequestReactionType<'_>
Format a RequestReactionType
into a format acceptable for use in URLs.
Examples
Format a custom reaction for use in a URL:
use twilight_http::request::channel::reaction::RequestReactionType;
use twilight_model::id::Id;
let reaction = RequestReactionType::Custom {
id: Id::new(123),
name: Some("rarity"),
};
assert_eq!("rarity:123", reaction.to_string());
Format the transgeneder flag for use in a URL:
use twilight_http::request::channel::reaction::RequestReactionType;
let reaction = RequestReactionType::Unicode {
name: "🏳️⚧️"
};
assert_eq!(
"%F0%9F%8F%B3%EF%B8%8F%E2%80%8D%E2%9A%A7%EF%B8%8F",
reaction.to_string(),
);
sourceimpl<'a> Hash for RequestReactionType<'a>
impl<'a> Hash for RequestReactionType<'a>
sourceimpl<'a> PartialEq<RequestReactionType<'a>> for RequestReactionType<'a>
impl<'a> PartialEq<RequestReactionType<'a>> for RequestReactionType<'a>
sourcefn eq(&self, other: &RequestReactionType<'a>) -> bool
fn eq(&self, other: &RequestReactionType<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RequestReactionType<'a>) -> bool
fn ne(&self, other: &RequestReactionType<'a>) -> bool
This method tests for !=
.
impl<'a> Copy for RequestReactionType<'a>
impl<'a> Eq for RequestReactionType<'a>
impl<'a> StructuralEq for RequestReactionType<'a>
impl<'a> StructuralPartialEq for RequestReactionType<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for RequestReactionType<'a>
impl<'a> Send for RequestReactionType<'a>
impl<'a> Sync for RequestReactionType<'a>
impl<'a> Unpin for RequestReactionType<'a>
impl<'a> UnwindSafe for RequestReactionType<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more