pub struct PhotoSize { /* private fields */ }
Expand description
This object represents one size of a photo or a file / sticker thumbnail.
Implementations§
source§impl PhotoSize
impl PhotoSize
pub fn new( file_id: String, file_unique_id: String, width: i64, height: i64 ) -> Self
sourcepub fn get_file_id<'a>(&'a self) -> Cow<'a, str>
pub fn get_file_id<'a>(&'a self) -> Cow<'a, str>
Identifier for this file, which can be used to download or reuse the file
sourcepub fn get_file_id_ref<'a>(&'a self) -> &'a str
pub fn get_file_id_ref<'a>(&'a self) -> &'a str
Identifier for this file, which can be used to download or reuse the file
sourcepub fn get_file_unique_id<'a>(&'a self) -> Cow<'a, str>
pub fn get_file_unique_id<'a>(&'a self) -> Cow<'a, str>
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.
sourcepub fn get_file_unique_id_ref<'a>(&'a self) -> &'a str
pub fn get_file_unique_id_ref<'a>(&'a self) -> &'a str
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.
sourcepub fn get_width_ref<'a>(&'a self) -> i64
pub fn get_width_ref<'a>(&'a self) -> i64
Photo width
sourcepub fn get_height<'a>(&'a self) -> i64
pub fn get_height<'a>(&'a self) -> i64
Photo height
sourcepub fn get_height_ref<'a>(&'a self) -> i64
pub fn get_height_ref<'a>(&'a self) -> i64
Photo height
sourcepub fn get_file_size<'a>(&'a self) -> Option<i64>
pub fn get_file_size<'a>(&'a self) -> Option<i64>
Optional. File size in bytes
sourcepub fn get_file_size_ref<'a>(&'a self) -> Option<i64>
pub fn get_file_size_ref<'a>(&'a self) -> Option<i64>
Optional. File size in bytes
Trait Implementations§
source§impl<'de> Deserialize<'de> for PhotoSize
impl<'de> Deserialize<'de> for PhotoSize
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<NoSkipPhotoSize> for PhotoSize
impl From<NoSkipPhotoSize> for PhotoSize
source§fn from(t: NoSkipPhotoSize) -> Self
fn from(t: NoSkipPhotoSize) -> Self
Converts to this type from the input type.
source§impl Into<NoSkipPhotoSize> for PhotoSize
impl Into<NoSkipPhotoSize> for PhotoSize
source§fn into(self) -> NoSkipPhotoSize
fn into(self) -> NoSkipPhotoSize
Converts this type into the (usually inferred) input type.