pub struct Photo {
pub raw: Photo,
}Expand description
Ergonomic wrapper over a Telegram photo.
Fields§
§raw: PhotoImplementations§
Source§impl Photo
impl Photo
pub fn from_raw(raw: Photo) -> Self
Sourcepub fn from_media(media: &MessageMedia) -> Option<Self>
pub fn from_media(media: &MessageMedia) -> Option<Self>
Try to extract from a MessageMedia variant.
pub fn id(&self) -> i64
pub fn access_hash(&self) -> i64
pub fn date(&self) -> i32
pub fn has_stickers(&self) -> bool
Sourcepub fn largest_thumb_type(&self) -> &str
pub fn largest_thumb_type(&self) -> &str
The largest available thumb type letter (e.g. "s", "m", "x").
Trait Implementations§
Source§impl Downloadable for Photo
impl Downloadable for Photo
Source§fn to_input_location(&self) -> Option<InputFileLocation>
fn to_input_location(&self) -> Option<InputFileLocation>
Return the
InputFileLocation needed for upload.getFile.Auto Trait Implementations§
impl Freeze for Photo
impl RefUnwindSafe for Photo
impl Send for Photo
impl Sync for Photo
impl Unpin for Photo
impl UnsafeUnpin for Photo
impl UnwindSafe for Photo
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more