Skip to main content

SendAudioBuilder

Struct SendAudioBuilder 

Source
pub struct SendAudioBuilder<'a, F: InputFile> {
Show 14 fields pub business_connection_id: Option<String>, pub chat_id: i64, pub message_thread_id: Option<i64>, pub caption: Option<String>, pub parse_mode: Option<String>, pub caption_entities: Option<Vec<MessageEntity>>, pub duration: Option<i64>, pub performer: Option<String>, pub title: Option<String>, pub disable_notification: Option<bool>, pub protect_content: Option<bool>, pub message_effect_id: Option<String>, pub reply_parameters: Option<ReplyParameters>, pub reply_markup: Option<InlineKeyboardMarkup>, /* private fields */
}

Fields§

§business_connection_id: Option<String>

Unique identifier of the business connection on behalf of which the message will be sent

§chat_id: i64

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

§message_thread_id: Option<i64>

Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

§caption: Option<String>

Audio caption, 0-1024 characters after entities parsing

§parse_mode: Option<String>

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

§caption_entities: Option<Vec<MessageEntity>>

A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode

§duration: Option<i64>

Duration of the audio in seconds

§performer: Option<String>

Performer

§title: Option<String>

Track name

§disable_notification: Option<bool>

Sends the message silently. Users will receive a notification with no sound.

§protect_content: Option<bool>

Protects the contents of the sent message from forwarding and saving

§message_effect_id: Option<String>

Unique identifier of the message effect to be added to the message; for private chats only

§reply_parameters: Option<ReplyParameters>

Description of the message to reply to

§reply_markup: Option<InlineKeyboardMarkup>

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user

Implementations§

Source§

impl<'a, F: InputFile> SendAudioBuilder<'a, F>

Source

pub fn new(bot: &'a Bot, chat_id: i64, audio: F) -> Self

Source

pub fn business_connection_id(self, business_connection_id: String) -> Self

Source

pub fn chat_id(self, chat_id: i64) -> Self

Source

pub fn message_thread_id(self, message_thread_id: i64) -> Self

Source

pub fn audio(self, audio: F) -> Self

Source

pub fn caption(self, caption: String) -> Self

Source

pub fn parse_mode(self, parse_mode: String) -> Self

Source

pub fn caption_entities(self, caption_entities: Vec<MessageEntity>) -> Self

Source

pub fn duration(self, duration: i64) -> Self

Source

pub fn performer(self, performer: String) -> Self

Source

pub fn title(self, title: String) -> Self

Source

pub fn thumbnail(self, thumbnail: F) -> Self

Source

pub fn disable_notification(self, disable_notification: bool) -> Self

Source

pub fn protect_content(self, protect_content: bool) -> Self

Source

pub fn message_effect_id(self, message_effect_id: String) -> Self

Source

pub fn reply_parameters(self, reply_parameters: ReplyParameters) -> Self

Source

pub fn reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self

Source

pub async fn send(self) -> Result<Message>

Trait Implementations§

Source§

impl<'a, F: InputFile> Serialize for SendAudioBuilder<'a, F>

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§

§

impl<'a, F> !RefUnwindSafe for SendAudioBuilder<'a, F>

§

impl<'a, F> !UnwindSafe for SendAudioBuilder<'a, F>

§

impl<'a, F> Freeze for SendAudioBuilder<'a, F>
where HashMap<&'a str, F>: Freeze,

§

impl<'a, F> Send for SendAudioBuilder<'a, F>
where HashMap<&'a str, F>: Send,

§

impl<'a, F> Sync for SendAudioBuilder<'a, F>
where HashMap<&'a str, F>: Sync,

§

impl<'a, F> Unpin for SendAudioBuilder<'a, F>
where HashMap<&'a str, F>: Unpin,

§

impl<'a, F> UnsafeUnpin for SendAudioBuilder<'a, F>
where HashMap<&'a str, F>: UnsafeUnpin,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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.

Source§

impl<T> Instrument for T

Source§

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

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

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 T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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