Struct botapi::gen_types::InlineQueryResultAudio
source · pub struct InlineQueryResultAudio {
pub tg_type: String,
pub id: String,
pub audio_url: String,
pub title: String,
pub caption: Option<String>,
pub parse_mode: Option<String>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub performer: Option<String>,
pub audio_duration: Option<i64>,
pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
}
Expand description
Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
Fields§
§tg_type: String
Type of the result, must be audio
id: String
Unique identifier for this result, 1-64 bytes
audio_url: String
A valid URL for the audio file
title: String
Title
caption: Option<String>
Optional. Caption, 0-1024 characters after entities parsing
parse_mode: Option<String>
Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
performer: Option<String>
Optional. Performer
audio_duration: Option<i64>
Optional. Audio duration in seconds
reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>
Optional. Inline keyboard attached to the message
input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>
Optional. Content of the message to be sent instead of the audio
Implementations§
source§impl InlineQueryResultAudio
impl InlineQueryResultAudio
pub fn noskip(self) -> NoSkipInlineQueryResultAudio
source§impl InlineQueryResultAudio
impl InlineQueryResultAudio
pub fn new(id: String, audio_url: String, title: String) -> Self
sourcepub fn get_tg_type<'a>(&'a self) -> &'a str
pub fn get_tg_type<'a>(&'a self) -> &'a str
Type of the result, must be audio
sourcepub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
Type of the result, must be audio
sourcepub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self
pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self
Unique identifier for this result, 1-64 bytes
sourcepub fn get_audio_url<'a>(&'a self) -> &'a str
pub fn get_audio_url<'a>(&'a self) -> &'a str
A valid URL for the audio file
sourcepub fn set_audio_url<'a>(&'a mut self, audio_url: String) -> &'a mut Self
pub fn set_audio_url<'a>(&'a mut self, audio_url: String) -> &'a mut Self
A valid URL for the audio file
sourcepub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self
pub fn set_title<'a>(&'a mut self, title: String) -> &'a mut Self
Title
sourcepub fn get_caption<'a>(&'a self) -> Option<&'a str>
pub fn get_caption<'a>(&'a self) -> Option<&'a str>
Optional. Caption, 0-1024 characters after entities parsing
sourcepub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self
pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self
Optional. Caption, 0-1024 characters after entities parsing
sourcepub fn get_parse_mode<'a>(&'a self) -> Option<&'a str>
pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str>
Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
sourcepub fn set_parse_mode<'a>(
&'a mut self,
parse_mode: Option<String>,
) -> &'a mut Self
pub fn set_parse_mode<'a>( &'a mut self, parse_mode: Option<String>, ) -> &'a mut Self
Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
sourcepub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>
pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn set_caption_entities<'a>(
&'a mut self,
caption_entities: Option<Vec<MessageEntity>>,
) -> &'a mut Self
pub fn set_caption_entities<'a>( &'a mut self, caption_entities: Option<Vec<MessageEntity>>, ) -> &'a mut Self
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn get_performer<'a>(&'a self) -> Option<&'a str>
pub fn get_performer<'a>(&'a self) -> Option<&'a str>
Optional. Performer
sourcepub fn set_performer<'a>(
&'a mut self,
performer: Option<String>,
) -> &'a mut Self
pub fn set_performer<'a>( &'a mut self, performer: Option<String>, ) -> &'a mut Self
Optional. Performer
sourcepub fn get_audio_duration<'a>(&'a self) -> Option<i64>
pub fn get_audio_duration<'a>(&'a self) -> Option<i64>
Optional. Audio duration in seconds
sourcepub fn set_audio_duration<'a>(
&'a mut self,
audio_duration: Option<i64>,
) -> &'a mut Self
pub fn set_audio_duration<'a>( &'a mut self, audio_duration: Option<i64>, ) -> &'a mut Self
Optional. Audio duration in seconds
sourcepub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>
pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>
Optional. Inline keyboard attached to the message
sourcepub fn set_reply_markup<'a>(
&'a mut self,
reply_markup: Option<InlineKeyboardMarkup>,
) -> &'a mut Self
pub fn set_reply_markup<'a>( &'a mut self, reply_markup: Option<InlineKeyboardMarkup>, ) -> &'a mut Self
Optional. Inline keyboard attached to the message
sourcepub fn get_input_message_content<'a>(
&'a self,
) -> Option<&'a InputMessageContent>
pub fn get_input_message_content<'a>( &'a self, ) -> Option<&'a InputMessageContent>
Optional. Content of the message to be sent instead of the audio
sourcepub fn set_input_message_content<'a>(
&'a mut self,
input_message_content: Option<InputMessageContent>,
) -> &'a mut Self
pub fn set_input_message_content<'a>( &'a mut self, input_message_content: Option<InputMessageContent>, ) -> &'a mut Self
Optional. Content of the message to be sent instead of the audio
Trait Implementations§
source§impl Clone for InlineQueryResultAudio
impl Clone for InlineQueryResultAudio
source§fn clone(&self) -> InlineQueryResultAudio
fn clone(&self) -> InlineQueryResultAudio
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InlineQueryResultAudio
impl Debug for InlineQueryResultAudio
source§impl Default for InlineQueryResultAudio
impl Default for InlineQueryResultAudio
source§fn default() -> InlineQueryResultAudio
fn default() -> InlineQueryResultAudio
source§impl<'de> Deserialize<'de> for InlineQueryResultAudio
impl<'de> Deserialize<'de> for InlineQueryResultAudio
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>,
source§impl From<BoxWrapper<Box<InlineQueryResultAudio>>> for InlineQueryResultAudio
impl From<BoxWrapper<Box<InlineQueryResultAudio>>> for InlineQueryResultAudio
source§fn from(t: BoxWrapper<Box<InlineQueryResultAudio>>) -> Self
fn from(t: BoxWrapper<Box<InlineQueryResultAudio>>) -> Self
source§impl From<BoxWrapper<Unbox<InlineQueryResultAudio>>> for InlineQueryResultAudio
impl From<BoxWrapper<Unbox<InlineQueryResultAudio>>> for InlineQueryResultAudio
source§fn from(t: BoxWrapper<Unbox<InlineQueryResultAudio>>) -> Self
fn from(t: BoxWrapper<Unbox<InlineQueryResultAudio>>) -> Self
source§impl From<NoSkipInlineQueryResultAudio> for InlineQueryResultAudio
impl From<NoSkipInlineQueryResultAudio> for InlineQueryResultAudio
source§fn from(t: NoSkipInlineQueryResultAudio) -> Self
fn from(t: NoSkipInlineQueryResultAudio) -> Self
source§impl Hash for InlineQueryResultAudio
impl Hash for InlineQueryResultAudio
source§impl Into<NoSkipInlineQueryResultAudio> for InlineQueryResultAudio
impl Into<NoSkipInlineQueryResultAudio> for InlineQueryResultAudio
source§fn into(self) -> NoSkipInlineQueryResultAudio
fn into(self) -> NoSkipInlineQueryResultAudio
source§impl Ord for InlineQueryResultAudio
impl Ord for InlineQueryResultAudio
source§fn cmp(&self, other: &InlineQueryResultAudio) -> Ordering
fn cmp(&self, other: &InlineQueryResultAudio) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for InlineQueryResultAudio
impl PartialEq for InlineQueryResultAudio
source§fn eq(&self, other: &InlineQueryResultAudio) -> bool
fn eq(&self, other: &InlineQueryResultAudio) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InlineQueryResultAudio
impl PartialOrd for InlineQueryResultAudio
source§fn partial_cmp(&self, other: &InlineQueryResultAudio) -> Option<Ordering>
fn partial_cmp(&self, other: &InlineQueryResultAudio) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for InlineQueryResultAudio
impl Serialize for InlineQueryResultAudio
impl Eq for InlineQueryResultAudio
impl StructuralPartialEq for InlineQueryResultAudio
Auto Trait Implementations§
impl Freeze for InlineQueryResultAudio
impl RefUnwindSafe for InlineQueryResultAudio
impl Send for InlineQueryResultAudio
impl Sync for InlineQueryResultAudio
impl Unpin for InlineQueryResultAudio
impl UnwindSafe for InlineQueryResultAudio
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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
key
and return true
if they are equal.