Struct twilight_http::request::channel::reaction::CreateReaction
source · [−]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)
.exec()
.await?;
Implementations
sourceimpl<'a> CreateReaction<'a>
impl<'a> CreateReaction<'a>
sourcepub fn exec(self) -> ResponseFuture<EmptyBody>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<EmptyBody>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.
Trait Implementations
sourceimpl TryIntoRequest for CreateReaction<'_>
impl TryIntoRequest for CreateReaction<'_>
Auto Trait Implementations
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
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