pub struct GetInvite<'a> { /* private fields */ }
Expand description
Get information about an invite by its code.
If with_counts
is called, the returned invite will contain approximate
member counts. If with_expiration
is called, it will contain the
expiration date.
Examples
use twilight_http::Client;
let client = Client::new("my token".to_owned());
let invite = client.invite("code").with_counts().exec().await?;
Implementations
sourceimpl<'a> GetInvite<'a>
impl<'a> GetInvite<'a>
sourcepub const fn with_counts(self) -> Self
pub const fn with_counts(self) -> Self
Whether the invite returned should contain approximate member counts.
sourcepub const fn with_expiration(self) -> Self
pub const fn with_expiration(self) -> Self
Whether the invite returned should contain its expiration date.
sourcepub fn exec(self) -> ResponseFuture<Invite>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<Invite>ⓘ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 GetInvite<'_>
impl TryIntoRequest for GetInvite<'_>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for GetInvite<'a>
impl<'a> Send for GetInvite<'a>
impl<'a> Sync for GetInvite<'a>
impl<'a> Unpin for GetInvite<'a>
impl<'a> !UnwindSafe for GetInvite<'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