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> !RefUnwindSafe for GetInvite<'a>
impl<'a> !UnwindSafe for GetInvite<'a>
impl<'a> Forget for GetInvite<'a>
impl<'a> Freeze for GetInvite<'a>
impl<'a> Move for GetInvite<'a>
impl<'a> Send for GetInvite<'a>
impl<'a> Sync for GetInvite<'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,
impl<'a> Unpin for GetInvite<'a>
impl<'a> UnsafeUnpin 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