pub struct GetStickerPack<'a> { /* private fields */ }Expand description
Get a sticker pack by its ID.
§Examples
use std::env;
use twilight_http::Client;
use twilight_model::id::Id;
let client = Client::new(env::var("DISCORD_TOKEN")?);
let id = Id::new(123);
let sticker_pack = client.sticker_pack(id).await?.model().await?;
println!("Sticker pack name: {}", sticker_pack.name);
println!("Sticker pack item names:");
for sticker in sticker_pack.stickers {
println!("- {}", sticker.name);
}Trait Implementations§
Source§impl IntoFuture for GetStickerPack<'_>
impl IntoFuture for GetStickerPack<'_>
Source§type Output = Result<Response<StickerPack>, Error>
type Output = Result<Response<StickerPack>, Error>
The output that the future will produce on completion.
Source§type IntoFuture = ResponseFuture<StickerPack>
type IntoFuture = ResponseFuture<StickerPack>
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 GetStickerPack<'_>
impl TryIntoRequest for GetStickerPack<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GetStickerPack<'a>
impl<'a> !UnwindSafe for GetStickerPack<'a>
impl<'a> Freeze for GetStickerPack<'a>
impl<'a> Send for GetStickerPack<'a>
impl<'a> Sync for GetStickerPack<'a>
impl<'a> Unpin for GetStickerPack<'a>
impl<'a> UnsafeUnpin for GetStickerPack<'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