pub struct Entitlement {
pub id: Snowflake,
pub sku_id: Snowflake,
pub application_id: Snowflake,
pub user_id: Option<Snowflake>,
pub entitlement_type: EntitlementType,
pub deleted: bool,
pub starts_at: Option<String>,
pub ends_at: Option<String>,
pub guild_id: Option<Snowflake>,
pub consumed: bool,
}Expand description
An entitlement represents a user’s access to a premium offering.
Fields§
§id: SnowflakeID of the entitlement.
sku_id: SnowflakeID of the SKU.
application_id: SnowflakeID of the parent application.
user_id: Option<Snowflake>ID of the user that is granted access.
entitlement_type: EntitlementTypeType of entitlement.
deleted: boolWhether the entitlement was deleted.
starts_at: Option<String>Start date at which the entitlement is valid (ISO8601 timestamp).
ends_at: Option<String>Date at which the entitlement is no longer valid (ISO8601 timestamp).
guild_id: Option<Snowflake>ID of the guild that is granted access.
consumed: boolWhether the entitlement has been consumed.
Trait Implementations§
Source§impl Clone for Entitlement
impl Clone for Entitlement
Source§fn clone(&self) -> Entitlement
fn clone(&self) -> Entitlement
Returns a duplicate 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
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