#[non_exhaustive]pub struct RoleSubscriptionData {
pub role_subscription_listing_id: SkuId,
pub tier_name: CompactString,
pub total_months_subscribed: u32,
pub is_renewal: bool,
}Expand description
The role subscription
a RoleSubscriptionPurchase message announces.
discord.js counterpart: RoleSubscriptionData.
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.role_subscription_listing_id: SkuIdThe SKU and listing the user subscribed to.
tier_name: CompactStringThe name of the tier.
total_months_subscribed: u32The total number of months the user has been subscribed for.
is_renewal: boolWhether this is a renewal rather than a new purchase.
Trait Implementations§
Source§impl Clone for RoleSubscriptionData
impl Clone for RoleSubscriptionData
Source§impl Debug for RoleSubscriptionData
impl Debug for RoleSubscriptionData
Source§impl<'de> Deserialize<'de> for RoleSubscriptionData
impl<'de> Deserialize<'de> for RoleSubscriptionData
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
impl Eq for RoleSubscriptionData
Source§impl Hash for RoleSubscriptionData
impl Hash for RoleSubscriptionData
Source§impl PartialEq for RoleSubscriptionData
impl PartialEq for RoleSubscriptionData
Source§impl Serialize for RoleSubscriptionData
impl Serialize for RoleSubscriptionData
impl StructuralPartialEq for RoleSubscriptionData
Auto Trait Implementations§
impl Forget for RoleSubscriptionData
impl Freeze for RoleSubscriptionData
impl Move for RoleSubscriptionData
impl RefUnwindSafe for RoleSubscriptionData
impl Send for RoleSubscriptionData
impl Sync for RoleSubscriptionData
impl Unpin for RoleSubscriptionData
impl UnsafeUnpin for RoleSubscriptionData
impl UnwindSafe for RoleSubscriptionData
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