pub struct InputMediaPhoto {
pub media: InputFile,
pub caption: Option<String>,
pub parse_mode: Option<ParseMode>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub has_spoiler: bool,
}Expand description
Represents a photo to be sent.
Fields§
§media: InputFileFile to send.
caption: Option<String>Caption of the photo to be sent, 0-1024 characters.
parse_mode: Option<ParseMode>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be
specified instead of parse_mode.
has_spoiler: boolPass true if the photo needs to be covered with a spoiler animation.
Implementations§
Source§impl InputMediaPhoto
impl InputMediaPhoto
pub const fn new(media: InputFile) -> Self
pub fn media(self, val: InputFile) -> Self
pub fn caption<S>(self, val: S) -> Self
pub const fn parse_mode(self, val: ParseMode) -> Self
pub fn caption_entities<C>(self, val: C) -> Selfwhere
C: IntoIterator<Item = MessageEntity>,
Sourcepub fn spoiler(self) -> Self
pub fn spoiler(self) -> Self
Sets has_spoiler to true.
Trait Implementations§
Source§impl Clone for InputMediaPhoto
impl Clone for InputMediaPhoto
Source§fn clone(&self) -> InputMediaPhoto
fn clone(&self) -> InputMediaPhoto
Returns a duplicate of the value. Read more
1.0.0 · 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 InputMediaPhoto
impl Debug for InputMediaPhoto
Auto Trait Implementations§
impl !Freeze for InputMediaPhoto
impl !RefUnwindSafe for InputMediaPhoto
impl Send for InputMediaPhoto
impl Sync for InputMediaPhoto
impl Unpin for InputMediaPhoto
impl !UnwindSafe for InputMediaPhoto
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
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