pub struct Entitlement {
pub application_id: Id<ApplicationMarker>,
pub consumed: Option<bool>,
pub deleted: bool,
pub ends_at: Option<Timestamp>,
pub guild_id: Option<Id<GuildMarker>>,
pub id: Id<EntitlementMarker>,
pub kind: EntitlementType,
pub sku_id: Id<SkuMarker>,
pub starts_at: Option<Timestamp>,
pub user_id: Option<Id<UserMarker>>,
}
Expand description
Entitlements in Discord represent that a user or guild has access to a premium offering in your application.
Fields§
§application_id: Id<ApplicationMarker>
ID of the parent application.
consumed: Option<bool>
Not applicable for App Subscriptions. Subscriptions are not consumed and will be false
deleted: bool
Entitlement was deleted.
ends_at: Option<Timestamp>
Date at which the entitlement is no longer valid. Not present when using test entitlements.
guild_id: Option<Id<GuildMarker>>
ID of the guild that is granted access to the entitlement’s sku.
id: Id<EntitlementMarker>
ID of the entitlement.
kind: EntitlementType
Type of entitlement.
sku_id: Id<SkuMarker>
ID of the SKU.
starts_at: Option<Timestamp>
Start date at which the entitlement is valid. Not present when using test entitlements.
user_id: Option<Id<UserMarker>>
ID of the user that is granted access to the entitlement’s sku.
Trait Implementations§
Source§impl Clone for Entitlement
impl Clone for Entitlement
Source§fn clone(&self) -> Entitlement
fn clone(&self) -> Entitlement
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 Entitlement
impl Debug for Entitlement
Source§impl<'de> Deserialize<'de> for Entitlement
impl<'de> Deserialize<'de> for Entitlement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for Entitlement
impl Hash for Entitlement
Source§impl PartialEq for Entitlement
impl PartialEq for Entitlement
Source§impl Serialize for Entitlement
impl Serialize for Entitlement
impl Eq for Entitlement
impl StructuralPartialEq for Entitlement
Auto Trait Implementations§
impl Freeze for Entitlement
impl RefUnwindSafe for Entitlement
impl Send for Entitlement
impl Sync for Entitlement
impl Unpin for Entitlement
impl UnwindSafe for Entitlement
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