pub struct InlineQueryResultAudio { /* private fields */ }
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.Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

Implementations§

source§

impl InlineQueryResultAudio

source§

impl InlineQueryResultAudio

source

pub fn new(id: String, audio_url: String, title: String) -> Self

source

pub fn get_tg_type<'a>(&'a self) -> Cow<'a, str>

Type of the result, must be audio

source

pub fn get_tg_type_ref<'a>(&'a self) -> &'a str

Type of the result, must be audio

source

pub fn get_id<'a>(&'a self) -> Cow<'a, str>

Unique identifier for this result, 1-64 bytes

source

pub fn get_id_ref<'a>(&'a self) -> &'a str

Unique identifier for this result, 1-64 bytes

source

pub fn get_audio_url<'a>(&'a self) -> Cow<'a, str>

A valid URL for the audio file

source

pub fn get_audio_url_ref<'a>(&'a self) -> &'a str

A valid URL for the audio file

source

pub fn get_title<'a>(&'a self) -> Cow<'a, str>

Title

source

pub fn get_title_ref<'a>(&'a self) -> &'a str

Title

source

pub fn get_caption<'a>(&'a self) -> Option<Cow<'a, str>>

Optional. Caption, 0-1024 characters after entities parsing

source

pub fn get_caption_ref<'a>(&'a self) -> Option<&'a str>

Optional. Caption, 0-1024 characters after entities parsing

source

pub fn get_parse_mode<'a>(&'a self) -> Option<Cow<'a, str>>

Optional. Mode for parsing entities in the audio caption. See formatting options for more details.

source

pub fn get_parse_mode_ref<'a>(&'a self) -> Option<&'a str>

Optional. Mode for parsing entities in the audio caption. See formatting options for more details.

source

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

source

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

source

pub fn get_performer<'a>(&'a self) -> Option<Cow<'a, str>>

Optional. Performer

source

pub fn get_performer_ref<'a>(&'a self) -> Option<&'a str>

Optional. Performer

source

pub fn get_audio_duration<'a>(&'a self) -> Option<i64>

Optional. Audio duration in seconds

source

pub fn get_audio_duration_ref<'a>(&'a self) -> Option<i64>

Optional. Audio duration in seconds

source

pub fn get_reply_markup<'a>(&'a self) -> Option<Cow<'a, InlineKeyboardMarkup>>

Optional. Inline keyboard attached to the message

source

pub fn get_reply_markup_ref<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>

Optional. Inline keyboard attached to the message

source

pub fn get_input_message_content<'a>( &'a self ) -> Option<Cow<'a, InputMessageContent>>

Optional. Content of the message to be sent instead of the audio

source

pub fn get_input_message_content_ref<'a>( &'a self ) -> Option<&'a InputMessageContent>

Optional. Content of the message to be sent instead of the audio

Trait Implementations§

source§

impl Clone for InlineQueryResultAudio

source§

fn clone(&self) -> InlineQueryResultAudio

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InlineQueryResultAudio

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for InlineQueryResultAudio

source§

fn default() -> InlineQueryResultAudio

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for InlineQueryResultAudio

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<NoSkipInlineQueryResultAudio> for InlineQueryResultAudio

source§

fn from(t: NoSkipInlineQueryResultAudio) -> Self

Converts to this type from the input type.
source§

impl Into<NoSkipInlineQueryResultAudio> for InlineQueryResultAudio

source§

fn into(self) -> NoSkipInlineQueryResultAudio

Converts this type into the (usually inferred) input type.
source§

impl Serialize for InlineQueryResultAudio

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,