pub struct Audio { /* private fields */ }
Expand description
This object represents an audio file to be treated as music by the Telegram clients.
Implementations§
source§impl Audio
impl Audio
pub fn new(file_id: String, file_unique_id: String, duration: 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_duration<'a>(&'a self) -> i64
pub fn get_duration<'a>(&'a self) -> i64
Duration of the audio in seconds as defined by sender
sourcepub fn get_duration_ref<'a>(&'a self) -> i64
pub fn get_duration_ref<'a>(&'a self) -> i64
Duration of the audio in seconds as defined by sender
sourcepub fn get_performer<'a>(&'a self) -> Option<Cow<'a, str>>
pub fn get_performer<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. Performer of the audio as defined by sender or by audio tags
sourcepub fn get_performer_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_performer_ref<'a>(&'a self) -> Option<&'a str>
Optional. Performer of the audio as defined by sender or by audio tags
sourcepub fn get_title<'a>(&'a self) -> Option<Cow<'a, str>>
pub fn get_title<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. Title of the audio as defined by sender or by audio tags
sourcepub fn get_title_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_title_ref<'a>(&'a self) -> Option<&'a str>
Optional. Title of the audio as defined by sender or by audio tags
sourcepub fn get_file_name<'a>(&'a self) -> Option<Cow<'a, str>>
pub fn get_file_name<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. Original filename as defined by sender
sourcepub fn get_file_name_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_file_name_ref<'a>(&'a self) -> Option<&'a str>
Optional. Original filename as defined by sender
sourcepub fn get_mime_type<'a>(&'a self) -> Option<Cow<'a, str>>
pub fn get_mime_type<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. MIME type of the file as defined by sender
sourcepub fn get_mime_type_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_mime_type_ref<'a>(&'a self) -> Option<&'a str>
Optional. MIME type of the file as defined by sender
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. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
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. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
sourcepub fn get_thumbnail<'a>(&'a self) -> Option<Cow<'a, PhotoSize>>
pub fn get_thumbnail<'a>(&'a self) -> Option<Cow<'a, PhotoSize>>
Optional. Thumbnail of the album cover to which the music file belongs
sourcepub fn get_thumbnail_ref<'a>(&'a self) -> Option<&'a PhotoSize>
pub fn get_thumbnail_ref<'a>(&'a self) -> Option<&'a PhotoSize>
Optional. Thumbnail of the album cover to which the music file belongs