pub struct GetEntitlements<'a> { /* private fields */ }Expand description
Get all entitlements for a given app, active and expired.
Implementations§
Source§impl<'a> GetEntitlements<'a>
impl<'a> GetEntitlements<'a>
Sourcepub const fn after(self, after: Id<EntitlementMarker>) -> Self
pub const fn after(self, after: Id<EntitlementMarker>) -> Self
Retrieve entitlements after this time.
Sourcepub const fn before(self, before: Id<EntitlementMarker>) -> Self
pub const fn before(self, before: Id<EntitlementMarker>) -> Self
Retrieve entitlements before this time.
Sourcepub const fn exclude_deleted(self, exclude_ended: bool) -> Self
pub const fn exclude_deleted(self, exclude_ended: bool) -> Self
Whether to exclude deleted entitlements.
Discord’s API defaults to true.
Sourcepub const fn exclude_ended(self, exclude_ended: bool) -> Self
pub const fn exclude_ended(self, exclude_ended: bool) -> Self
Whether to exclude ended entitlements.
Sourcepub const fn guild_id(self, guild_id: Id<GuildMarker>) -> Self
pub const fn guild_id(self, guild_id: Id<GuildMarker>) -> Self
Guild ID to look up entitlements for.
Sourcepub fn limit(self, limit: u8) -> Result<Self, ValidationError>
pub fn limit(self, limit: u8) -> Result<Self, ValidationError>
Number of entitlements to return. Set to 100 if unspecified.
The minimum is 1 and the maximum is 100.
§Errors
Returns a GetEntitlementsError error type if the amount
is less than 1 or greater than 100.
Sourcepub const fn sku_ids(self, sku_ids: &'a [Id<SkuMarker>]) -> Self
pub const fn sku_ids(self, sku_ids: &'a [Id<SkuMarker>]) -> Self
List of SKU IDs to check entitlements for.
Sourcepub const fn user_id(self, user_id: Id<UserMarker>) -> Self
pub const fn user_id(self, user_id: Id<UserMarker>) -> Self
User ID to look up entitlements for.
Trait Implementations§
Source§impl IntoFuture for GetEntitlements<'_>
impl IntoFuture for GetEntitlements<'_>
Source§type Output = Result<Response<ListBody<Entitlement>>, Error>
type Output = Result<Response<ListBody<Entitlement>>, Error>
The output that the future will produce on completion.
Source§type IntoFuture = ResponseFuture<ListBody<Entitlement>>
type IntoFuture = ResponseFuture<ListBody<Entitlement>>
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 GetEntitlements<'_>
impl TryIntoRequest for GetEntitlements<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GetEntitlements<'a>
impl<'a> !UnwindSafe for GetEntitlements<'a>
impl<'a> Forget for GetEntitlements<'a>
impl<'a> Freeze for GetEntitlements<'a>where
PhantomData<fn(ApplicationMarker) -> ApplicationMarker>: Freeze,
NonZero<u64>: Freeze,
PhantomData<fn(EntitlementMarker) -> EntitlementMarker>: Freeze,
PhantomData<fn(GuildMarker) -> GuildMarker>: Freeze,
&'a [Id<SkuMarker>]: Freeze,
PhantomData<fn(UserMarker) -> UserMarker>: Freeze,
&'a Client: Freeze,
impl<'a> Move for GetEntitlements<'a>
impl<'a> Send for GetEntitlements<'a>
impl<'a> Sync for GetEntitlements<'a>where
NonZero<u64>: Sync,
RawVecInner: 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 GetEntitlements<'a>
impl<'a> UnsafeUnpin for GetEntitlements<'a>where
PhantomData<fn(ApplicationMarker) -> ApplicationMarker>: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
PhantomData<fn(EntitlementMarker) -> EntitlementMarker>: UnsafeUnpin,
PhantomData<fn(GuildMarker) -> GuildMarker>: UnsafeUnpin,
&'a [Id<SkuMarker>]: UnsafeUnpin,
PhantomData<fn(UserMarker) -> UserMarker>: UnsafeUnpin,
&'a Client: 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