pub struct PhotoSizeBuilder {
pub file_id: String,
pub file_unique_id: String,
pub width: i64,
pub height: i64,
pub file_size: Option<i64>,
}Expand description
This object represents one size of a photo or a file / sticker thumbnail.
Fields§
§file_id: StringIdentifier for this file, which can be used to download or reuse the file
file_unique_id: StringUnique 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.
width: i64Photo width
height: i64Photo height
file_size: Option<i64>Optional. File size in bytes
Implementations§
Source§impl PhotoSizeBuilder
impl PhotoSizeBuilder
pub fn new( file_id: String, file_unique_id: String, width: i64, height: i64, ) -> Self
Sourcepub fn set_file_id(self, file_id: String) -> Self
pub fn set_file_id(self, file_id: String) -> Self
Identifier for this file, which can be used to download or reuse the file
Sourcepub fn set_file_unique_id(self, file_unique_id: String) -> Self
pub fn set_file_unique_id(self, file_unique_id: String) -> Self
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 set_height(self, height: i64) -> Self
pub fn set_height(self, height: i64) -> Self
Photo height
Sourcepub fn set_file_size(self, file_size: i64) -> Self
pub fn set_file_size(self, file_size: i64) -> Self
Optional. File size in bytes
pub fn build(self) -> PhotoSize
Trait Implementations§
Source§impl Clone for PhotoSizeBuilder
impl Clone for PhotoSizeBuilder
Source§fn clone(&self) -> PhotoSizeBuilder
fn clone(&self) -> PhotoSizeBuilder
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 PhotoSizeBuilder
impl Debug for PhotoSizeBuilder
Source§impl Default for PhotoSizeBuilder
impl Default for PhotoSizeBuilder
Source§fn default() -> PhotoSizeBuilder
fn default() -> PhotoSizeBuilder
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PhotoSizeBuilder
impl<'de> Deserialize<'de> for PhotoSizeBuilder
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 Hash for PhotoSizeBuilder
impl Hash for PhotoSizeBuilder
Source§impl Ord for PhotoSizeBuilder
impl Ord for PhotoSizeBuilder
Source§fn cmp(&self, other: &PhotoSizeBuilder) -> Ordering
fn cmp(&self, other: &PhotoSizeBuilder) -> 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 PhotoSizeBuilder
impl PartialEq for PhotoSizeBuilder
Source§impl PartialOrd for PhotoSizeBuilder
impl PartialOrd for PhotoSizeBuilder
Source§impl Serialize for PhotoSizeBuilder
impl Serialize for PhotoSizeBuilder
impl Eq for PhotoSizeBuilder
impl StructuralPartialEq for PhotoSizeBuilder
Auto Trait Implementations§
impl Freeze for PhotoSizeBuilder
impl RefUnwindSafe for PhotoSizeBuilder
impl Send for PhotoSizeBuilder
impl Sync for PhotoSizeBuilder
impl Unpin for PhotoSizeBuilder
impl UnsafeUnpin for PhotoSizeBuilder
impl UnwindSafe for PhotoSizeBuilder
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.