Struct twilight_http::request::channel::webhook::ExecuteWebhookAndWait [−][src]
pub struct ExecuteWebhookAndWait<'a> { /* fields omitted */ }Expand description
Execute a webhook, sending a message to its channel, and then wait for the message to be created.
Examples
use twilight_http::Client;
use twilight_model::id::WebhookId;
let client = Client::new("my token".to_owned());
let id = WebhookId::new(432).expect("non zero");
let message = client
.execute_webhook(id, "webhook token")
.content("Pinkie...")
.wait()
.exec()
.await?
.model()
.await?;
println!("message id: {}", message.id);Implementations
pub fn exec(self) -> ResponseFuture<Message>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<Message>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
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.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ExecuteWebhookAndWait<'a>
impl<'a> Send for ExecuteWebhookAndWait<'a>
impl<'a> Sync for ExecuteWebhookAndWait<'a>
impl<'a> Unpin for ExecuteWebhookAndWait<'a>
impl<'a> !UnwindSafe for ExecuteWebhookAndWait<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more