Struct botapi::gen_types::ChatBoostSourcePremium
source · pub struct ChatBoostSourcePremium {
pub source: String,
pub user: BoxWrapper<Unbox<User>>,
}Expand description
The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.
Fields§
§source: StringSource of the boost, always “premium”
user: BoxWrapper<Unbox<User>>User that boosted the chat
Implementations§
source§impl ChatBoostSourcePremium
impl ChatBoostSourcePremium
pub fn noskip(self) -> NoSkipChatBoostSourcePremium
source§impl ChatBoostSourcePremium
impl ChatBoostSourcePremium
pub fn new<A: Into<User>>(source: String, user: A) -> Self
sourcepub fn get_source<'a>(&'a self) -> &'a str
pub fn get_source<'a>(&'a self) -> &'a str
Source of the boost, always “premium”
sourcepub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self
pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self
Source of the boost, always “premium”
sourcepub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self
pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self
User that boosted the chat
Trait Implementations§
source§impl Clone for ChatBoostSourcePremium
impl Clone for ChatBoostSourcePremium
source§fn clone(&self) -> ChatBoostSourcePremium
fn clone(&self) -> ChatBoostSourcePremium
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 ChatBoostSourcePremium
impl Debug for ChatBoostSourcePremium
source§impl Default for ChatBoostSourcePremium
impl Default for ChatBoostSourcePremium
source§fn default() -> ChatBoostSourcePremium
fn default() -> ChatBoostSourcePremium
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ChatBoostSourcePremium
impl<'de> Deserialize<'de> for ChatBoostSourcePremium
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 From<BoxWrapper<Box<ChatBoostSourcePremium>>> for ChatBoostSourcePremium
impl From<BoxWrapper<Box<ChatBoostSourcePremium>>> for ChatBoostSourcePremium
source§fn from(t: BoxWrapper<Box<ChatBoostSourcePremium>>) -> Self
fn from(t: BoxWrapper<Box<ChatBoostSourcePremium>>) -> Self
Converts to this type from the input type.
source§impl From<BoxWrapper<Unbox<ChatBoostSourcePremium>>> for ChatBoostSourcePremium
impl From<BoxWrapper<Unbox<ChatBoostSourcePremium>>> for ChatBoostSourcePremium
source§fn from(t: BoxWrapper<Unbox<ChatBoostSourcePremium>>) -> Self
fn from(t: BoxWrapper<Unbox<ChatBoostSourcePremium>>) -> Self
Converts to this type from the input type.
source§impl From<NoSkipChatBoostSourcePremium> for ChatBoostSourcePremium
impl From<NoSkipChatBoostSourcePremium> for ChatBoostSourcePremium
source§fn from(t: NoSkipChatBoostSourcePremium) -> Self
fn from(t: NoSkipChatBoostSourcePremium) -> Self
Converts to this type from the input type.
source§impl Hash for ChatBoostSourcePremium
impl Hash for ChatBoostSourcePremium
source§impl Into<NoSkipChatBoostSourcePremium> for ChatBoostSourcePremium
impl Into<NoSkipChatBoostSourcePremium> for ChatBoostSourcePremium
source§fn into(self) -> NoSkipChatBoostSourcePremium
fn into(self) -> NoSkipChatBoostSourcePremium
Converts this type into the (usually inferred) input type.
source§impl Ord for ChatBoostSourcePremium
impl Ord for ChatBoostSourcePremium
source§fn cmp(&self, other: &ChatBoostSourcePremium) -> Ordering
fn cmp(&self, other: &ChatBoostSourcePremium) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ChatBoostSourcePremium
impl PartialEq for ChatBoostSourcePremium
source§impl PartialOrd for ChatBoostSourcePremium
impl PartialOrd for ChatBoostSourcePremium
source§impl Serialize for ChatBoostSourcePremium
impl Serialize for ChatBoostSourcePremium
impl Eq for ChatBoostSourcePremium
impl StructuralPartialEq for ChatBoostSourcePremium
Auto Trait Implementations§
impl Freeze for ChatBoostSourcePremium
impl RefUnwindSafe for ChatBoostSourcePremium
impl Send for ChatBoostSourcePremium
impl Sync for ChatBoostSourcePremium
impl Unpin for ChatBoostSourcePremium
impl UnwindSafe for ChatBoostSourcePremium
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.