pub struct InlineQueryResultCachedVoiceBuilder {
pub tg_type: String,
pub id: String,
pub voice_file_id: String,
pub title: String,
pub caption: Option<String>,
pub parse_mode: Option<String>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
}
Expand description
Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.
Fields§
§tg_type: String
Type of the result, must be voice
id: String
Unique identifier for this result, 1-64 bytes
voice_file_id: String
A valid file identifier for the voice message
title: String
Voice message title
caption: Option<String>
Optional. Caption, 0-1024 characters after entities parsing
parse_mode: Option<String>
Optional. Mode for parsing entities in the voice message 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
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 voice message
Implementations§
source§impl InlineQueryResultCachedVoiceBuilder
impl InlineQueryResultCachedVoiceBuilder
pub fn new(id: String, voice_file_id: String, title: String) -> Self
sourcepub fn set_voice_file_id(self, voice_file_id: String) -> Self
pub fn set_voice_file_id(self, voice_file_id: String) -> Self
A valid file identifier for the voice message
sourcepub fn set_caption(self, caption: String) -> Self
pub fn set_caption(self, caption: String) -> Self
Optional. Caption, 0-1024 characters after entities parsing
sourcepub fn set_parse_mode(self, parse_mode: String) -> Self
pub fn set_parse_mode(self, parse_mode: String) -> Self
Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
sourcepub fn set_caption_entities(self, caption_entities: Vec<MessageEntity>) -> Self
pub fn set_caption_entities(self, caption_entities: Vec<MessageEntity>) -> Self
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn set_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
pub fn set_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
Optional. Inline keyboard attached to the message
sourcepub fn set_input_message_content(
self,
input_message_content: InputMessageContent,
) -> Self
pub fn set_input_message_content( self, input_message_content: InputMessageContent, ) -> Self
Optional. Content of the message to be sent instead of the voice message
pub fn build(self) -> InlineQueryResultCachedVoice
Trait Implementations§
source§impl Clone for InlineQueryResultCachedVoiceBuilder
impl Clone for InlineQueryResultCachedVoiceBuilder
source§fn clone(&self) -> InlineQueryResultCachedVoiceBuilder
fn clone(&self) -> InlineQueryResultCachedVoiceBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for InlineQueryResultCachedVoiceBuilder
impl Default for InlineQueryResultCachedVoiceBuilder
source§fn default() -> InlineQueryResultCachedVoiceBuilder
fn default() -> InlineQueryResultCachedVoiceBuilder
source§impl<'de> Deserialize<'de> for InlineQueryResultCachedVoiceBuilder
impl<'de> Deserialize<'de> for InlineQueryResultCachedVoiceBuilder
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 Ord for InlineQueryResultCachedVoiceBuilder
impl Ord for InlineQueryResultCachedVoiceBuilder
source§fn cmp(&self, other: &InlineQueryResultCachedVoiceBuilder) -> Ordering
fn cmp(&self, other: &InlineQueryResultCachedVoiceBuilder) -> 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 InlineQueryResultCachedVoiceBuilder
impl PartialEq for InlineQueryResultCachedVoiceBuilder
source§fn eq(&self, other: &InlineQueryResultCachedVoiceBuilder) -> bool
fn eq(&self, other: &InlineQueryResultCachedVoiceBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InlineQueryResultCachedVoiceBuilder
impl PartialOrd for InlineQueryResultCachedVoiceBuilder
source§fn partial_cmp(
&self,
other: &InlineQueryResultCachedVoiceBuilder,
) -> Option<Ordering>
fn partial_cmp( &self, other: &InlineQueryResultCachedVoiceBuilder, ) -> 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 moreimpl Eq for InlineQueryResultCachedVoiceBuilder
impl StructuralPartialEq for InlineQueryResultCachedVoiceBuilder
Auto Trait Implementations§
impl Freeze for InlineQueryResultCachedVoiceBuilder
impl RefUnwindSafe for InlineQueryResultCachedVoiceBuilder
impl Send for InlineQueryResultCachedVoiceBuilder
impl Sync for InlineQueryResultCachedVoiceBuilder
impl Unpin for InlineQueryResultCachedVoiceBuilder
impl UnwindSafe for InlineQueryResultCachedVoiceBuilder
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.