pub struct InputMediaVoiceNote {
pub media: InputFile,
pub caption: Option<String>,
pub parse_mode: Option<ParseMode>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub duration: Option<u16>,
}Expand description
Represents a voice note to be sent.
Fields§
§media: InputFileFile to send.
caption: Option<String>Caption of the voice note to be sent, 0-1024 characters.
parse_mode: Option<ParseMode>§caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be
specified instead of parse_mode.
duration: Option<u16>Duration of the voice note in seconds.
Implementations§
Source§impl InputMediaVoiceNote
impl InputMediaVoiceNote
pub const fn new(media: InputFile) -> InputMediaVoiceNote
pub fn media(self, media: InputFile) -> InputMediaVoiceNote
pub fn caption(self, caption: impl Into<String>) -> InputMediaVoiceNote
pub const fn parse_mode(self, parse_mode: ParseMode) -> InputMediaVoiceNote
pub fn caption_entities<C>(self, caption_entities: C) -> InputMediaVoiceNotewhere
C: IntoIterator<Item = MessageEntity>,
pub const fn duration(self, duration: u16) -> InputMediaVoiceNote
Trait Implementations§
Source§impl Clone for InputMediaVoiceNote
impl Clone for InputMediaVoiceNote
Source§fn clone(&self) -> InputMediaVoiceNote
fn clone(&self) -> InputMediaVoiceNote
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InputMediaVoiceNote
impl Debug for InputMediaVoiceNote
Source§impl Serialize for InputMediaVoiceNote
impl Serialize for InputMediaVoiceNote
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl !Freeze for InputMediaVoiceNote
impl !RefUnwindSafe for InputMediaVoiceNote
impl !UnwindSafe for InputMediaVoiceNote
impl Send for InputMediaVoiceNote
impl Sync for InputMediaVoiceNote
impl Unpin for InputMediaVoiceNote
impl UnsafeUnpin for InputMediaVoiceNote
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more