Skip to main content

InputMedia

Enum InputMedia 

Source
pub enum InputMedia {
Show 20 variants Empty, UploadedPhoto(InputMediaUploadedPhoto), Photo(InputMediaPhoto), GeoPoint(InputMediaGeoPoint), Contact(InputMediaContact), UploadedDocument(InputMediaUploadedDocument), Document(InputMediaDocument), Venue(InputMediaVenue), PhotoExternal(InputMediaPhotoExternal), DocumentExternal(InputMediaDocumentExternal), Game(InputMediaGame), Invoice(Box<InputMediaInvoice>), GeoLive(InputMediaGeoLive), Poll(InputMediaPoll), Dice(InputMediaDice), Story(InputMediaStory), WebPage(InputMediaWebPage), PaidMedia(InputMediaPaidMedia), Todo(InputMediaTodo), StakeDice(InputMediaStakeDice),
}
Expand description

Variants§

Trait Implementations§

Source§

impl Clone for InputMedia

Source§

fn clone(&self) -> InputMedia

Returns a duplicate 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 InputMedia

Source§

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

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

impl Deserializable for InputMedia

Source§

fn deserialize(buf: Buffer<'_, '_>) -> Result<Self>

Read Self from buf, advancing its position.
Source§

fn from_bytes(bytes: &[u8]) -> Result<Self>

Convenience: deserialize from a byte slice.
Source§

impl From<InputMediaContact> for InputMedia

Source§

fn from(x: InputMediaContact) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaDice> for InputMedia

Source§

fn from(x: InputMediaDice) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaDocument> for InputMedia

Source§

fn from(x: InputMediaDocument) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaDocumentExternal> for InputMedia

Source§

fn from(x: InputMediaDocumentExternal) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaEmpty> for InputMedia

Source§

fn from(_x: InputMediaEmpty) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaGame> for InputMedia

Source§

fn from(x: InputMediaGame) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaGeoLive> for InputMedia

Source§

fn from(x: InputMediaGeoLive) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaGeoPoint> for InputMedia

Source§

fn from(x: InputMediaGeoPoint) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaInvoice> for InputMedia

Source§

fn from(x: InputMediaInvoice) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaPaidMedia> for InputMedia

Source§

fn from(x: InputMediaPaidMedia) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaPhoto> for InputMedia

Source§

fn from(x: InputMediaPhoto) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaPhotoExternal> for InputMedia

Source§

fn from(x: InputMediaPhotoExternal) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaPoll> for InputMedia

Source§

fn from(x: InputMediaPoll) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaStakeDice> for InputMedia

Source§

fn from(x: InputMediaStakeDice) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaStory> for InputMedia

Source§

fn from(x: InputMediaStory) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaTodo> for InputMedia

Source§

fn from(x: InputMediaTodo) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaUploadedDocument> for InputMedia

Source§

fn from(x: InputMediaUploadedDocument) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaUploadedPhoto> for InputMedia

Source§

fn from(x: InputMediaUploadedPhoto) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaVenue> for InputMedia

Source§

fn from(x: InputMediaVenue) -> Self

Converts to this type from the input type.
Source§

impl From<InputMediaWebPage> for InputMedia

Source§

fn from(x: InputMediaWebPage) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for InputMedia

Source§

fn eq(&self, other: &InputMedia) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serializable for InputMedia

Source§

fn serialize(&self, buf: &mut impl Extend<u8>)

Appends the serialized form of self to buf.
Source§

fn to_bytes(&self) -> Vec<u8>

Convenience: allocate a fresh Vec<u8> and serialize into it.
Source§

impl TryFrom<InputMedia> for InputMediaContact

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaDice

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaDocument

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaDocumentExternal

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaGame

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaGeoLive

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaGeoPoint

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaInvoice

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaPaidMedia

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaPhoto

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaPhotoExternal

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaPoll

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaStakeDice

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaStory

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaTodo

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaUploadedDocument

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaUploadedPhoto

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaVenue

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputMedia> for InputMediaWebPage

Source§

type Error = InputMedia

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

fn try_from(v: InputMedia) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl StructuralPartialEq for InputMedia

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

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

Source§

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