pub enum InputGroupMedia {
Audio(InputMediaAudio),
Document(InputMediaDocument),
LivePhoto(InputMediaLivePhoto),
Photo(InputMediaPhoto),
Video(InputMediaVideo),
}Expand description
Media that can be sent as a part of a media group (album) via
SendMediaGroup.
Unlike InputMedia, this union intentionally excludes animations and
voice notes because the Bot API does not allow them in media groups.
Use InputGroupMedia::from(..)/.into() on a concrete InputMedia* type,
or TryFrom<InputMedia> for converting from an InputMedia.
Variants§
Audio(InputMediaAudio)
Document(InputMediaDocument)
LivePhoto(InputMediaLivePhoto)
Photo(InputMediaPhoto)
Video(InputMediaVideo)
Trait Implementations§
Source§impl Clone for InputGroupMedia
impl Clone for InputGroupMedia
Source§fn clone(&self) -> InputGroupMedia
fn clone(&self) -> InputGroupMedia
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 InputGroupMedia
impl Debug for InputGroupMedia
Source§impl From<InputGroupMedia> for InputMedia
impl From<InputGroupMedia> for InputMedia
Source§fn from(media: InputGroupMedia) -> InputMedia
fn from(media: InputGroupMedia) -> InputMedia
Converts to this type from the input type.
Source§impl From<InputMediaAudio> for InputGroupMedia
impl From<InputMediaAudio> for InputGroupMedia
Source§fn from(media: InputMediaAudio) -> InputGroupMedia
fn from(media: InputMediaAudio) -> InputGroupMedia
Converts to this type from the input type.
Source§impl From<InputMediaDocument> for InputGroupMedia
impl From<InputMediaDocument> for InputGroupMedia
Source§fn from(media: InputMediaDocument) -> InputGroupMedia
fn from(media: InputMediaDocument) -> InputGroupMedia
Converts to this type from the input type.
Source§impl From<InputMediaLivePhoto> for InputGroupMedia
impl From<InputMediaLivePhoto> for InputGroupMedia
Source§fn from(media: InputMediaLivePhoto) -> InputGroupMedia
fn from(media: InputMediaLivePhoto) -> InputGroupMedia
Converts to this type from the input type.
Source§impl From<InputMediaPhoto> for InputGroupMedia
impl From<InputMediaPhoto> for InputGroupMedia
Source§fn from(media: InputMediaPhoto) -> InputGroupMedia
fn from(media: InputMediaPhoto) -> InputGroupMedia
Converts to this type from the input type.
Source§impl From<InputMediaVideo> for InputGroupMedia
impl From<InputMediaVideo> for InputGroupMedia
Source§fn from(media: InputMediaVideo) -> InputGroupMedia
fn from(media: InputMediaVideo) -> InputGroupMedia
Converts to this type from the input type.
Source§impl Serialize for InputGroupMedia
impl Serialize for InputGroupMedia
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
Source§impl TryFrom<InputMedia> for InputGroupMedia
impl TryFrom<InputMedia> for InputGroupMedia
Source§type Error = UnsupportedGroupMedia
type Error = UnsupportedGroupMedia
The type returned in the event of a conversion error.
Source§fn try_from(
media: InputMedia,
) -> Result<InputGroupMedia, <InputGroupMedia as TryFrom<InputMedia>>::Error>
fn try_from( media: InputMedia, ) -> Result<InputGroupMedia, <InputGroupMedia as TryFrom<InputMedia>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl !Freeze for InputGroupMedia
impl !RefUnwindSafe for InputGroupMedia
impl !UnwindSafe for InputGroupMedia
impl Send for InputGroupMedia
impl Sync for InputGroupMedia
impl Unpin for InputGroupMedia
impl UnsafeUnpin for InputGroupMedia
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