Skip to main content

StarGift

Struct StarGift 

Source
pub struct StarGift {
Show 28 fields pub limited: bool, pub sold_out: bool, pub birthday: bool, pub require_premium: bool, pub limited_per_user: bool, pub peer_color_available: bool, pub auction: bool, pub id: i64, pub sticker: Document, pub stars: i64, pub availability_remains: Option<i32>, pub availability_total: Option<i32>, pub availability_resale: Option<i64>, pub convert_stars: i64, pub first_sale_date: Option<i32>, pub last_sale_date: Option<i32>, pub upgrade_stars: Option<i64>, pub resell_min_stars: Option<i64>, pub title: Option<String>, pub released_by: Option<Peer>, pub per_user_total: Option<i32>, pub per_user_remains: Option<i32>, pub locked_until_date: Option<i32>, pub auction_slug: Option<String>, pub gifts_per_round: Option<i32>, pub auction_start_date: Option<i32>, pub upgrade_variants: Option<i32>, pub background: Option<StarGiftBackground>,
}
Expand description

starGift

Generated from:

starGift#313a9547 flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true require_premium:flags.7?true limited_per_user:flags.8?true peer_color_available:flags.10?true auction:flags.11?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int availability_resale:flags.4?long convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long resell_min_stars:flags.4?long title:flags.5?string released_by:flags.6?Peer per_user_total:flags.8?int per_user_remains:flags.8?int locked_until_date:flags.9?int auction_slug:flags.11?string gifts_per_round:flags.11?int auction_start_date:flags.11?int upgrade_variants:flags.12?int background:flags.13?StarGiftBackground = StarGift

Fields§

§limited: bool§sold_out: bool§birthday: bool§require_premium: bool§limited_per_user: bool§peer_color_available: bool§auction: bool§id: i64§sticker: Document§stars: i64§availability_remains: Option<i32>§availability_total: Option<i32>§availability_resale: Option<i64>§convert_stars: i64§first_sale_date: Option<i32>§last_sale_date: Option<i32>§upgrade_stars: Option<i64>§resell_min_stars: Option<i64>§title: Option<String>§released_by: Option<Peer>§per_user_total: Option<i32>§per_user_remains: Option<i32>§locked_until_date: Option<i32>§auction_slug: Option<String>§gifts_per_round: Option<i32>§auction_start_date: Option<i32>§upgrade_variants: Option<i32>§background: Option<StarGiftBackground>

Trait Implementations§

Source§

impl Clone for StarGift

Source§

fn clone(&self) -> StarGift

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StarGift

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deserializable for StarGift

Source§

fn deserialize(buf: Buffer<'_, '_>) -> Result<Self>

Read Self from buf, advancing its position.
Source§

fn from_bytes(bytes: &[u8]) -> Result<Self>

Convenience: deserialize from a byte slice.
Source§

impl From<StarGift> for StarGift

Source§

fn from(x: StarGift) -> Self

Converts to this type from the input type.
Source§

impl Identifiable for StarGift

Source§

const CONSTRUCTOR_ID: u32 = 0x313a9547

The constructor ID as specified in the TL schema.
Source§

impl PartialEq for StarGift

Source§

fn eq(&self, other: &StarGift) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serializable for StarGift

Source§

fn serialize(&self, buf: &mut impl Extend<u8>)

Appends the serialized form of self to buf.
Source§

fn to_bytes(&self) -> Vec<u8>

Convenience: allocate a fresh Vec<u8> and serialize into it.
Source§

impl TryFrom<StarGift> for StarGift

Source§

type Error = StarGift

The type returned in the event of a conversion error.
Source§

fn try_from(v: StarGift) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl StructuralPartialEq for StarGift

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.