pub struct PaidMediaPreview {
pub tg_type: String,
pub width: Option<i64>,
pub height: Option<i64>,
pub duration: Option<i64>,
}Expand description
The paid media isn’t available before the payment.
Fields§
§tg_type: StringType of the paid media, always “preview”
width: Option<i64>Optional. Media width as defined by the sender
height: Option<i64>Optional. Media height as defined by the sender
duration: Option<i64>Optional. Duration of the media in seconds as defined by the sender
Implementations§
Source§impl PaidMediaPreview
impl PaidMediaPreview
pub fn noskip(self) -> NoSkipPaidMediaPreview
Source§impl PaidMediaPreview
impl PaidMediaPreview
pub fn new() -> Self
Sourcepub fn get_tg_type<'a>(&'a self) -> &'a str
pub fn get_tg_type<'a>(&'a self) -> &'a str
Type of the paid media, always “preview”
Sourcepub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
Type of the paid media, always “preview”
Sourcepub fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self
pub fn set_width<'a>(&'a mut self, width: Option<i64>) -> &'a mut Self
Optional. Media width as defined by the sender
Sourcepub fn get_height<'a>(&'a self) -> Option<i64>
pub fn get_height<'a>(&'a self) -> Option<i64>
Optional. Media height as defined by the sender
Sourcepub fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self
pub fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self
Optional. Media height as defined by the sender
Sourcepub fn get_duration<'a>(&'a self) -> Option<i64>
pub fn get_duration<'a>(&'a self) -> Option<i64>
Optional. Duration of the media in seconds as defined by the sender
Sourcepub fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self
pub fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self
Optional. Duration of the media in seconds as defined by the sender
Trait Implementations§
Source§impl Clone for PaidMediaPreview
impl Clone for PaidMediaPreview
Source§fn clone(&self) -> PaidMediaPreview
fn clone(&self) -> PaidMediaPreview
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 PaidMediaPreview
impl Debug for PaidMediaPreview
Source§impl Default for PaidMediaPreview
impl Default for PaidMediaPreview
Source§fn default() -> PaidMediaPreview
fn default() -> PaidMediaPreview
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PaidMediaPreview
impl<'de> Deserialize<'de> for PaidMediaPreview
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<PaidMediaPreview>>> for PaidMediaPreview
impl From<BoxWrapper<Box<PaidMediaPreview>>> for PaidMediaPreview
Source§fn from(t: BoxWrapper<Box<PaidMediaPreview>>) -> Self
fn from(t: BoxWrapper<Box<PaidMediaPreview>>) -> Self
Converts to this type from the input type.
Source§impl From<BoxWrapper<Unbox<PaidMediaPreview>>> for PaidMediaPreview
impl From<BoxWrapper<Unbox<PaidMediaPreview>>> for PaidMediaPreview
Source§fn from(t: BoxWrapper<Unbox<PaidMediaPreview>>) -> Self
fn from(t: BoxWrapper<Unbox<PaidMediaPreview>>) -> Self
Converts to this type from the input type.
Source§impl From<NoSkipPaidMediaPreview> for PaidMediaPreview
impl From<NoSkipPaidMediaPreview> for PaidMediaPreview
Source§fn from(t: NoSkipPaidMediaPreview) -> Self
fn from(t: NoSkipPaidMediaPreview) -> Self
Converts to this type from the input type.
Source§impl Hash for PaidMediaPreview
impl Hash for PaidMediaPreview
Source§impl Into<NoSkipPaidMediaPreview> for PaidMediaPreview
impl Into<NoSkipPaidMediaPreview> for PaidMediaPreview
Source§fn into(self) -> NoSkipPaidMediaPreview
fn into(self) -> NoSkipPaidMediaPreview
Converts this type into the (usually inferred) input type.
Source§impl Ord for PaidMediaPreview
impl Ord for PaidMediaPreview
Source§fn cmp(&self, other: &PaidMediaPreview) -> Ordering
fn cmp(&self, other: &PaidMediaPreview) -> 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 PaidMediaPreview
impl PartialEq for PaidMediaPreview
Source§impl PartialOrd for PaidMediaPreview
impl PartialOrd for PaidMediaPreview
Source§impl Serialize for PaidMediaPreview
impl Serialize for PaidMediaPreview
impl Eq for PaidMediaPreview
impl StructuralPartialEq for PaidMediaPreview
Auto Trait Implementations§
impl Freeze for PaidMediaPreview
impl RefUnwindSafe for PaidMediaPreview
impl Send for PaidMediaPreview
impl Sync for PaidMediaPreview
impl Unpin for PaidMediaPreview
impl UnsafeUnpin for PaidMediaPreview
impl UnwindSafe for PaidMediaPreview
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§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.