pub struct InlineQueryResultGif { /* private fields */ }
Expand description

Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

Implementations§

source§

impl InlineQueryResultGif

source§

impl InlineQueryResultGif

source

pub fn new(id: String, gif_url: String, thumbnail_url: String) -> Self

source

pub fn into_tuple( self ) -> (String, String, String, Option<i64>, Option<i64>, Option<i64>, String, Option<String>, Option<String>, Option<String>, Option<String>, Option<Vec<MessageEntity>>, Option<InlineKeyboardMarkup>, Option<InputMessageContent>)

Consumes and deconstructs this type into a tuple with one element per field. Tuple type returned is: (type, id, gif_url, gif_width, gif_height, gif_duration, thumbnail_url, thumbnail_mime_type, title, caption, parse_mode, caption_entities, reply_markup, input_message_content)

source

pub fn get_tg_type<'a>(&'a self) -> Cow<'a, str>

Type of the result, must be gif

source

pub fn get_tg_type_ref<'a>(&'a self) -> &'a str

Type of the result, must be gif

source

pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self

Type of the result, must be gif

source

pub fn get_id<'a>(&'a self) -> Cow<'a, str>

Unique identifier for this result, 1-64 bytes

source

pub fn get_id_ref<'a>(&'a self) -> &'a str

Unique identifier for this result, 1-64 bytes

source

pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self

Unique identifier for this result, 1-64 bytes

source

pub fn get_gif_url<'a>(&'a self) -> Cow<'a, str>

A valid URL for the GIF file. File size must not exceed 1MB

source

pub fn get_gif_url_ref<'a>(&'a self) -> &'a str

A valid URL for the GIF file. File size must not exceed 1MB

source

pub fn set_gif_url<'a>(&'a mut self, gif_url: String) -> &'a mut Self

A valid URL for the GIF file. File size must not exceed 1MB

source

pub fn get_gif_width<'a>(&'a self) -> Option<i64>

Optional. Width of the GIF

source

pub fn get_gif_width_ref<'a>(&'a self) -> Option<i64>

Optional. Width of the GIF

source

pub fn set_gif_width<'a>(&'a mut self, gif_width: Option<i64>) -> &'a mut Self

Optional. Width of the GIF

source

pub fn get_gif_height<'a>(&'a self) -> Option<i64>

Optional. Height of the GIF

source

pub fn get_gif_height_ref<'a>(&'a self) -> Option<i64>

Optional. Height of the GIF

source

pub fn set_gif_height<'a>(&'a mut self, gif_height: Option<i64>) -> &'a mut Self

Optional. Height of the GIF

source

pub fn get_gif_duration<'a>(&'a self) -> Option<i64>

Optional. Duration of the GIF in seconds

source

pub fn get_gif_duration_ref<'a>(&'a self) -> Option<i64>

Optional. Duration of the GIF in seconds

source

pub fn set_gif_duration<'a>( &'a mut self, gif_duration: Option<i64> ) -> &'a mut Self

Optional. Duration of the GIF in seconds

source

pub fn get_thumbnail_url<'a>(&'a self) -> Cow<'a, str>

URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result

source

pub fn get_thumbnail_url_ref<'a>(&'a self) -> &'a str

URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result

source

pub fn set_thumbnail_url<'a>( &'a mut self, thumbnail_url: String ) -> &'a mut Self

URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result

source

pub fn get_thumbnail_mime_type<'a>(&'a self) -> Option<Cow<'a, str>>

Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”

source

pub fn get_thumbnail_mime_type_ref<'a>(&'a self) -> Option<&'a str>

Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”

source

pub fn set_thumbnail_mime_type<'a>( &'a mut self, thumbnail_mime_type: Option<String> ) -> &'a mut Self

Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”

source

pub fn get_title<'a>(&'a self) -> Option<Cow<'a, str>>

Optional. Title for the result

source

pub fn get_title_ref<'a>(&'a self) -> Option<&'a str>

Optional. Title for the result

source

pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self

Optional. Title for the result

source

pub fn get_caption<'a>(&'a self) -> Option<Cow<'a, str>>

Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing

source

pub fn get_caption_ref<'a>(&'a self) -> Option<&'a str>

Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing

source

pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self

Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing

source

pub fn get_parse_mode<'a>(&'a self) -> Option<Cow<'a, str>>

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

source

pub fn get_parse_mode_ref<'a>(&'a self) -> Option<&'a str>

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

source

pub fn set_parse_mode<'a>( &'a mut self, parse_mode: Option<String> ) -> &'a mut Self

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

source

pub fn get_caption_entities<'a>(&'a self) -> Option<Cow<'a, Vec<MessageEntity>>>

Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode

source

pub fn get_caption_entities_ref<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>

Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode

source

pub fn set_caption_entities<'a>( &'a mut self, caption_entities: Option<Vec<MessageEntity>> ) -> &'a mut Self

Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode

source

pub fn get_reply_markup<'a>(&'a self) -> Option<Cow<'a, InlineKeyboardMarkup>>

Optional. Inline keyboard attached to the message

source

pub fn get_reply_markup_ref<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>

Optional. Inline keyboard attached to the message

source

pub fn set_reply_markup<'a>( &'a mut self, reply_markup: Option<InlineKeyboardMarkup> ) -> &'a mut Self

Optional. Inline keyboard attached to the message

source

pub fn get_input_message_content<'a>( &'a self ) -> Option<Cow<'a, InputMessageContent>>

Optional. Content of the message to be sent instead of the GIF animation

source

pub fn get_input_message_content_ref<'a>( &'a self ) -> Option<&'a InputMessageContent>

Optional. Content of the message to be sent instead of the GIF animation

source

pub fn set_input_message_content<'a>( &'a mut self, input_message_content: Option<InputMessageContent> ) -> &'a mut Self

Optional. Content of the message to be sent instead of the GIF animation

Trait Implementations§

source§

impl Clone for InlineQueryResultGif

source§

fn clone(&self) -> InlineQueryResultGif

Returns a copy 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 InlineQueryResultGif

source§

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

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

impl Default for InlineQueryResultGif

source§

fn default() -> InlineQueryResultGif

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for InlineQueryResultGif

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<NoSkipInlineQueryResultGif> for InlineQueryResultGif

source§

fn from(t: NoSkipInlineQueryResultGif) -> Self

Converts to this type from the input type.
source§

impl Into<NoSkipInlineQueryResultGif> for InlineQueryResultGif

source§

fn into(self) -> NoSkipInlineQueryResultGif

Converts this type into the (usually inferred) input type.
source§

impl Serialize for InlineQueryResultGif

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§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere T: Clone,

§

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

§

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 Twhere U: TryFrom<T>,

§

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

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

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

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,