#[non_exhaustive]pub struct ListEntitlements {
pub user_id: Option<UserId>,
pub sku_ids: Vec<SkuId>,
pub before: Option<EntitlementId>,
pub after: Option<EntitlementId>,
pub limit: Option<u8>,
pub guild_id: Option<GuildId>,
pub exclude_ended: Option<bool>,
pub exclude_deleted: Option<bool>,
}Expand description
The query of List Entitlements.
discord.js counterpart: the options of EntitlementManager#fetch.
§Examples
use djs_model::{id::UserId, rest::ListEntitlements};
// The active entitlements of one user.
let mut query = ListEntitlements::default();
query.user_id = Some(UserId::new(7));
query.exclude_ended = Some(true);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.user_id: Option<UserId>Only the entitlements of this user.
sku_ids: Vec<SkuId>Only the entitlements to these SKUs (sent comma-separated; none means all).
before: Option<EntitlementId>Entitlements before this one.
after: Option<EntitlementId>Entitlements after this one.
limit: Option<u8>How many entitlements (1-100; Discord’s default is 100).
guild_id: Option<GuildId>Only the entitlements of this guild.
exclude_ended: Option<bool>Whether to leave out entitlements that have ended (Discord’s default: false).
exclude_deleted: Option<bool>Whether to leave out deleted entitlements (Discord’s default: true).
Trait Implementations§
Source§impl Clone for ListEntitlements
impl Clone for ListEntitlements
Source§impl Debug for ListEntitlements
impl Debug for ListEntitlements
Source§impl Default for ListEntitlements
impl Default for ListEntitlements
impl Eq for ListEntitlements
Source§impl Hash for ListEntitlements
impl Hash for ListEntitlements
Source§impl PartialEq for ListEntitlements
impl PartialEq for ListEntitlements
impl StructuralPartialEq for ListEntitlements
Auto Trait Implementations§
impl Freeze for ListEntitlements
impl RefUnwindSafe for ListEntitlements
impl Send for ListEntitlements
impl Sync for ListEntitlements
impl Unpin for ListEntitlements
impl UnsafeUnpin for ListEntitlements
impl UnwindSafe for ListEntitlements
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