Struct botapi::gen_types::InlineQueryResultVoice
source · pub struct InlineQueryResultVoice { /* private fields */ }Expand description
Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Implementations§
source§impl InlineQueryResultVoice
impl InlineQueryResultVoice
pub fn noskip(self) -> NoSkipInlineQueryResultVoice
source§impl InlineQueryResultVoice
impl InlineQueryResultVoice
pub fn new(id: String, voice_url: String, title: String) -> Self
sourcepub fn into_tuple(
self
) -> (String, String, String, String, Option<String>, Option<String>, Option<Vec<MessageEntity>>, Option<i64>, Option<InlineKeyboardMarkup>, Option<InputMessageContent>)
pub fn into_tuple( self ) -> (String, String, String, String, Option<String>, Option<String>, Option<Vec<MessageEntity>>, Option<i64>, Option<InlineKeyboardMarkup>, Option<InputMessageContent>)
Consumes and deconstructs this type into a tuple with one element per field. Tuple type returned is: (type, id, voice_url, title, caption, parse_mode, caption_entities, voice_duration, reply_markup, input_message_content)
sourcepub fn get_tg_type<'a>(&'a self) -> Cow<'a, str>
pub fn get_tg_type<'a>(&'a self) -> Cow<'a, str>
Type of the result, must be voice
sourcepub fn get_tg_type_ref<'a>(&'a self) -> &'a str
pub fn get_tg_type_ref<'a>(&'a self) -> &'a str
Type of the result, must be voice
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 voice
sourcepub fn get_id_ref<'a>(&'a self) -> &'a str
pub fn get_id_ref<'a>(&'a self) -> &'a str
Unique identifier for this result, 1-64 bytes
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_voice_url<'a>(&'a self) -> Cow<'a, str>
pub fn get_voice_url<'a>(&'a self) -> Cow<'a, str>
A valid URL for the voice recording
sourcepub fn get_voice_url_ref<'a>(&'a self) -> &'a str
pub fn get_voice_url_ref<'a>(&'a self) -> &'a str
A valid URL for the voice recording
sourcepub fn set_voice_url<'a>(&'a mut self, voice_url: String) -> &'a mut Self
pub fn set_voice_url<'a>(&'a mut self, voice_url: String) -> &'a mut Self
A valid URL for the voice recording
sourcepub fn get_title_ref<'a>(&'a self) -> &'a str
pub fn get_title_ref<'a>(&'a self) -> &'a str
Recording title
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
Recording title
sourcepub fn get_caption<'a>(&'a self) -> Option<Cow<'a, str>>
pub fn get_caption<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. Caption, 0-1024 characters after entities parsing
sourcepub fn get_caption_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_caption_ref<'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<Cow<'a, str>>
pub fn get_parse_mode<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
sourcepub fn get_parse_mode_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_parse_mode_ref<'a>(&'a self) -> Option<&'a str>
Optional. Mode for parsing entities in the voice message 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 voice message caption. See formatting options for more details.
sourcepub fn get_caption_entities<'a>(&'a self) -> Option<Cow<'a, Vec<MessageEntity>>>
pub fn get_caption_entities<'a>(&'a self) -> Option<Cow<'a, Vec<MessageEntity>>>
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn get_caption_entities_ref<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>
pub fn get_caption_entities_ref<'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_voice_duration<'a>(&'a self) -> Option<i64>
pub fn get_voice_duration<'a>(&'a self) -> Option<i64>
Optional. Recording duration in seconds
sourcepub fn get_voice_duration_ref<'a>(&'a self) -> Option<i64>
pub fn get_voice_duration_ref<'a>(&'a self) -> Option<i64>
Optional. Recording duration in seconds
sourcepub fn set_voice_duration<'a>(
&'a mut self,
voice_duration: Option<i64>
) -> &'a mut Self
pub fn set_voice_duration<'a>( &'a mut self, voice_duration: Option<i64> ) -> &'a mut Self
Optional. Recording duration in seconds
sourcepub fn get_reply_markup<'a>(&'a self) -> Option<Cow<'a, InlineKeyboardMarkup>>
pub fn get_reply_markup<'a>(&'a self) -> Option<Cow<'a, InlineKeyboardMarkup>>
Optional. Inline keyboard attached to the message
sourcepub fn get_reply_markup_ref<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>
pub fn get_reply_markup_ref<'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<Cow<'a, InputMessageContent>>
pub fn get_input_message_content<'a>( &'a self ) -> Option<Cow<'a, InputMessageContent>>
Optional. Content of the message to be sent instead of the voice recording
sourcepub fn get_input_message_content_ref<'a>(
&'a self
) -> Option<&'a InputMessageContent>
pub fn get_input_message_content_ref<'a>( &'a self ) -> Option<&'a InputMessageContent>
Optional. Content of the message to be sent instead of the voice recording
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 voice recording
Trait Implementations§
source§impl Clone for InlineQueryResultVoice
impl Clone for InlineQueryResultVoice
source§fn clone(&self) -> InlineQueryResultVoice
fn clone(&self) -> InlineQueryResultVoice
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more