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().await?;
Implementations§
source§impl<'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.
Trait Implementations§
source§impl IntoFuture for GetInvite<'_>
impl IntoFuture for GetInvite<'_>
source§type Output = Result<Response<Invite>, Error>
type Output = Result<Response<Invite>, Error>
The output that the future will produce on completion.
source§type IntoFuture = ResponseFuture<Invite>
type IntoFuture = ResponseFuture<Invite>
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
Auto Trait Implementations§
impl<'a> Freeze for GetInvite<'a>
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§
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