pub struct ChatBoost {
pub boost_id: String,
pub add_date: i64,
pub expiration_date: i64,
pub source: BoxWrapper<Unbox<ChatBoostSource>>,
}
Expand description
This object contains information about a chat boost.
Fields§
§boost_id: String
Unique identifier of the boost
add_date: i64
Point in time (Unix timestamp) when the chat was boosted
expiration_date: i64
Point in time (Unix timestamp) when the boost will automatically expire, unless the booster’s Telegram Premium subscription is prolonged
source: BoxWrapper<Unbox<ChatBoostSource>>
Source of the added boost
Implementations§
source§impl ChatBoost
impl ChatBoost
pub fn new<A: Into<ChatBoostSource>>( boost_id: String, add_date: i64, expiration_date: i64, source: A, ) -> Self
sourcepub fn get_boost_id<'a>(&'a self) -> &'a str
pub fn get_boost_id<'a>(&'a self) -> &'a str
Unique identifier of the boost
sourcepub fn set_boost_id<'a>(&'a mut self, boost_id: String) -> &'a mut Self
pub fn set_boost_id<'a>(&'a mut self, boost_id: String) -> &'a mut Self
Unique identifier of the boost
sourcepub fn get_add_date<'a>(&'a self) -> i64
pub fn get_add_date<'a>(&'a self) -> i64
Point in time (Unix timestamp) when the chat was boosted
sourcepub fn set_add_date<'a>(&'a mut self, add_date: i64) -> &'a mut Self
pub fn set_add_date<'a>(&'a mut self, add_date: i64) -> &'a mut Self
Point in time (Unix timestamp) when the chat was boosted
sourcepub fn get_expiration_date<'a>(&'a self) -> i64
pub fn get_expiration_date<'a>(&'a self) -> i64
Point in time (Unix timestamp) when the boost will automatically expire, unless the booster’s Telegram Premium subscription is prolonged
sourcepub fn set_expiration_date<'a>(
&'a mut self,
expiration_date: i64,
) -> &'a mut Self
pub fn set_expiration_date<'a>( &'a mut self, expiration_date: i64, ) -> &'a mut Self
Point in time (Unix timestamp) when the boost will automatically expire, unless the booster’s Telegram Premium subscription is prolonged
sourcepub fn get_source<'a>(&'a self) -> &'a ChatBoostSource
pub fn get_source<'a>(&'a self) -> &'a ChatBoostSource
Source of the added boost
sourcepub fn set_source<'a>(&'a mut self, source: ChatBoostSource) -> &'a mut Self
pub fn set_source<'a>(&'a mut self, source: ChatBoostSource) -> &'a mut Self
Source of the added boost
Trait Implementations§
source§impl<'de> Deserialize<'de> for ChatBoost
impl<'de> Deserialize<'de> for ChatBoost
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>,
source§impl From<NoSkipChatBoost> for ChatBoost
impl From<NoSkipChatBoost> for ChatBoost
source§fn from(t: NoSkipChatBoost) -> Self
fn from(t: NoSkipChatBoost) -> Self
source§impl Into<NoSkipChatBoost> for ChatBoost
impl Into<NoSkipChatBoost> for ChatBoost
source§fn into(self) -> NoSkipChatBoost
fn into(self) -> NoSkipChatBoost
source§impl Ord for ChatBoost
impl Ord for ChatBoost
source§impl PartialEq for ChatBoost
impl PartialEq for ChatBoost
source§impl PartialOrd for ChatBoost
impl PartialOrd for ChatBoost
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ChatBoost
impl StructuralPartialEq for ChatBoost
Auto Trait Implementations§
impl Freeze for ChatBoost
impl RefUnwindSafe for ChatBoost
impl Send for ChatBoost
impl Sync for ChatBoost
impl Unpin for ChatBoost
impl UnwindSafe for ChatBoost
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
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)
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
key
and return true
if they are equal.