pub struct GetEntitlements { /* private fields */ }
Expand description
Builds a request to fetch active and ended Entitlement
s.
This is a helper for Http::get_entitlements
used via Entitlement::list
.
Implementations§
Source§impl GetEntitlements
impl GetEntitlements
Sourcepub fn user_id(self, user_id: UserId) -> Self
pub fn user_id(self, user_id: UserId) -> Self
Filters the returned entitlements by the given UserId
.
Sourcepub fn sku_ids(self, sku_ids: Vec<SkuId>) -> Self
pub fn sku_ids(self, sku_ids: Vec<SkuId>) -> Self
Filters the returned entitlements by the given SkuId
s.
Sourcepub fn before(self, before: EntitlementId) -> Self
pub fn before(self, before: EntitlementId) -> Self
Filters the returned entitlements to before the given EntitlementId
.
Sourcepub fn after(self, after: EntitlementId) -> Self
pub fn after(self, after: EntitlementId) -> Self
Filters the returned entitlements to after the given EntitlementId
.
Sourcepub fn limit(self, limit: u8) -> Self
pub fn limit(self, limit: u8) -> Self
Limits the number of entitlements that may be returned.
This is limited to 0..=100
.
Sourcepub fn guild_id(self, guild_id: GuildId) -> Self
pub fn guild_id(self, guild_id: GuildId) -> Self
Filters the returned entitlements by the given GuildId
.
Sourcepub fn exclude_ended(self, exclude_ended: bool) -> Self
pub fn exclude_ended(self, exclude_ended: bool) -> Self
Filters the returned entitlements to only active entitlements, if true
.
Trait Implementations§
Source§impl Builder for GetEntitlements
impl Builder for GetEntitlements
Source§type Context<'ctx> = ()
type Context<'ctx> = ()
Additional data that’s only required when sending a request off to the API.
type Built = Vec<Entitlement>
Source§fn execute<'life0, 'async_trait>(
self,
cache_http: impl 'async_trait + CacheHttp,
__arg2: Self::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<Self::Built>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
self,
cache_http: impl 'async_trait + CacheHttp,
__arg2: Self::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<Self::Built>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Serializes a builder’s fields and sends the request off the API, returning the response.
Source§impl Clone for GetEntitlements
impl Clone for GetEntitlements
Source§fn clone(&self) -> GetEntitlements
fn clone(&self) -> GetEntitlements
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GetEntitlements
impl Debug for GetEntitlements
Source§impl Default for GetEntitlements
impl Default for GetEntitlements
Source§fn default() -> GetEntitlements
fn default() -> GetEntitlements
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GetEntitlements
impl RefUnwindSafe for GetEntitlements
impl Send for GetEntitlements
impl Sync for GetEntitlements
impl Unpin for GetEntitlements
impl UnwindSafe for GetEntitlements
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