pub struct CreateReaction<'a> { /* private fields */ }
Expand description
Create a reaction in a Id<ChannelMarker>
on a Id<MessageMarker>
.
The reaction must be a variant of RequestReactionType
.
ยงExamples
use twilight_http::{request::channel::reaction::RequestReactionType, Client};
use twilight_model::id::Id;
let client = Client::new("my token".to_owned());
let channel_id = Id::new(123);
let message_id = Id::new(456);
let emoji = RequestReactionType::Unicode { name: "๐" };
let reaction = client
.create_reaction(channel_id, message_id, &emoji)
.await?;
Trait Implementationsยง
sourceยงimpl IntoFuture for CreateReaction<'_>
impl IntoFuture for CreateReaction<'_>
sourceยงtype Output = Result<Response<EmptyBody>, Error>
type Output = Result<Response<EmptyBody>, Error>
The output that the future will produce on completion.
sourceยงtype IntoFuture = ResponseFuture<EmptyBody>
type IntoFuture = ResponseFuture<EmptyBody>
Which kind of future are we turning this into?
sourceยงfn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
sourceยงimpl TryIntoRequest for CreateReaction<'_>
impl TryIntoRequest for CreateReaction<'_>
Auto Trait Implementationsยง
impl<'a> Freeze for CreateReaction<'a>
impl<'a> !RefUnwindSafe for CreateReaction<'a>
impl<'a> Send for CreateReaction<'a>
impl<'a> Sync for CreateReaction<'a>
impl<'a> Unpin for CreateReaction<'a>
impl<'a> !UnwindSafe for CreateReaction<'a>
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