pub struct ExecuteWebhookAndWait<'a> { /* private fields */ }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::Id;
let client = Client::new("my token".to_owned());
let id = Id::new(432);
let message = client
.execute_webhook(id, "webhook token")
.content("Pinkie...")
.wait()
.await?
.model()
.await?;
println!("message id: {}", message.id);Trait Implementations§
Source§impl IntoFuture for ExecuteWebhookAndWait<'_>
impl IntoFuture for ExecuteWebhookAndWait<'_>
Source§type Output = Result<Response<Message>, Error>
type Output = Result<Response<Message>, Error>
The output that the future will produce on completion.
Source§type IntoFuture = ResponseFuture<Message>
type IntoFuture = ResponseFuture<Message>
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 ExecuteWebhookAndWait<'_>
impl TryIntoRequest for ExecuteWebhookAndWait<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExecuteWebhookAndWait<'a>
impl<'a> !UnwindSafe for ExecuteWebhookAndWait<'a>
impl<'a> Forget for ExecuteWebhookAndWait<'a>
impl<'a> Freeze for ExecuteWebhookAndWait<'a>where
&'a Client: Freeze,
*const u8 is !null: Freeze,
PhantomData<&'a Attachment>: Freeze,
PhantomData<Id<AttachmentMarker>>: Freeze,
&'a AllowedMentions: Freeze,
PhantomData<PartialAttachment<'a>>: Freeze,
&'a str: Freeze,
&'a [Component]: Freeze,
&'a [Embed]: Freeze,
InternalBitFlags: Freeze,
&'a [u8]: Freeze,
PhantomData<u8>: Freeze,
*const dyn Error + Send + Sync is !null: Freeze,
PhantomData<dyn Error + Send + Sync>: Freeze,
PhantomData<fn(ChannelMarker) -> ChannelMarker>: Freeze,
NonZero<u64>: Freeze,
PhantomData<fn(WebhookMarker) -> WebhookMarker>: Freeze,
impl<'a> Move for ExecuteWebhookAndWait<'a>
impl<'a> Send for ExecuteWebhookAndWait<'a>
impl<'a> Sync for ExecuteWebhookAndWait<'a>where
RawVecInner: Sync,
NonZero<u64>: Sync,
BoxRaw<[Pos]>: Sync,
Bytes: Sync,
Arc<Config>: Sync,
Arc<Resolver<GenericConnector<TokioRuntimeProvider>>>: Sync,
Arc<ClientConfig>: Sync,
Arc<dyn ResolveServerName + Send + Sync>: Sync,
Arc<dyn Executor<Pin<Box<dyn Future<Output = ()> + Send>>> + Send + Sync>: Sync,
Arc<dyn Timer + Send + Sync>: Sync,
Arc<Mutex<PoolInner<PoolClient<Full<Bytes>>, (Scheme, Authority)>>>: Sync,
BoxRaw<str>: Sync,
Arc<Chan<(Message, Option<Box<dyn FnOnce(Option<Bucket>) -> bool + Send>>), Semaphore>>: Sync,
Arc<Atomic<bool>>: Sync,
InternalBitFlags: Sync,
BoxRaw<Component>: Sync,
InternalBitFlags: Sync,
InternalBitFlags: Sync,
NonZero<i32>: Sync,
InternalBitFlags: Sync,
BoxRaw<dyn Error + Send + Sync>: Sync,
impl<'a> Unpin for ExecuteWebhookAndWait<'a>
impl<'a> UnsafeUnpin for ExecuteWebhookAndWait<'a>where
&'a Client: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<&'a Attachment>: UnsafeUnpin,
PhantomData<Id<AttachmentMarker>>: UnsafeUnpin,
&'a AllowedMentions: UnsafeUnpin,
PhantomData<PartialAttachment<'a>>: UnsafeUnpin,
&'a str: UnsafeUnpin,
&'a [Component]: UnsafeUnpin,
&'a [Embed]: UnsafeUnpin,
InternalBitFlags: UnsafeUnpin,
&'a [u8]: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const dyn Error + Send + Sync is !null: UnsafeUnpin,
PhantomData<dyn Error + Send + Sync>: UnsafeUnpin,
PhantomData<fn(ChannelMarker) -> ChannelMarker>: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
PhantomData<fn(WebhookMarker) -> WebhookMarker>: UnsafeUnpin,
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