pub struct Document {
pub raw: MessageMediaDocument,
}Fields§
§raw: MessageMediaDocumentImplementations§
Source§impl Document
impl Document
pub fn from_raw_media(document: MessageMediaDocument) -> Self
pub fn to_raw_input_media(&self) -> InputMediaDocument
pub fn id(&self) -> i64
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Return the file’s name.
If the file was uploaded with no file name, the returned string will be empty.
Sourcepub fn creation_date(&self) -> Option<DateTime<Utc>>
pub fn creation_date(&self) -> Option<DateTime<Utc>>
The date on which the file was created, if any.
Sourcepub fn thumbs(&self) -> Vec<PhotoSize>
pub fn thumbs(&self) -> Vec<PhotoSize>
Get document thumbs. https://core.telegram.org/api/files#image-thumbnail-types
Sourcepub fn resolution(&self) -> Option<(i32, i32)>
pub fn resolution(&self) -> Option<(i32, i32)>
Width & height of video/image
Sourcepub fn audio_title(&self) -> Option<String>
pub fn audio_title(&self) -> Option<String>
Title of audio
Sourcepub fn is_animated(&self) -> bool
pub fn is_animated(&self) -> bool
Returns true if the document is an animated sticker
Sourcepub fn is_spoiler(&self) -> bool
pub fn is_spoiler(&self) -> bool
Returns true if the document is a spoiler
Trait Implementations§
Source§impl Downloadable for Document
impl Downloadable for Document
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
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