Struct carapax::types::InlineQueryResultArticle
source · pub struct InlineQueryResultArticle { /* private fields */ }
Expand description
Represents a link to an article or a web page.
Implementations§
source§impl InlineQueryResultArticle
impl InlineQueryResultArticle
sourcepub fn new<A, B, C>(
id: A,
input_message_content: B,
title: C
) -> InlineQueryResultArticle
pub fn new<A, B, C>( id: A, input_message_content: B, title: C ) -> InlineQueryResultArticle
Creates a new InlineQueryResultArticle
.
§Arguments
id
- Unique identifier; 1-64 Bytes.input_message_content
- Content of the message.title
- Title of the result.
sourcepub fn with_description<T>(self, value: T) -> InlineQueryResultArticle
pub fn with_description<T>(self, value: T) -> InlineQueryResultArticle
sourcepub fn with_hide_url(self, value: bool) -> InlineQueryResultArticle
pub fn with_hide_url(self, value: bool) -> InlineQueryResultArticle
Sets a new value for a hide_url
flag.
§Arguments
value
- Indicates whether the URL must to be shown in the message.
sourcepub fn with_reply_markup<T>(self, value: T) -> InlineQueryResultArticlewhere
T: Into<InlineKeyboardMarkup>,
pub fn with_reply_markup<T>(self, value: T) -> InlineQueryResultArticlewhere
T: Into<InlineKeyboardMarkup>,
sourcepub fn with_thumbnail_height(self, value: i64) -> InlineQueryResultArticle
pub fn with_thumbnail_height(self, value: i64) -> InlineQueryResultArticle
sourcepub fn with_thumbnail_width(self, value: i64) -> InlineQueryResultArticle
pub fn with_thumbnail_width(self, value: i64) -> InlineQueryResultArticle
sourcepub fn with_thumbnail_url<T>(self, value: T) -> InlineQueryResultArticle
pub fn with_thumbnail_url<T>(self, value: T) -> InlineQueryResultArticle
sourcepub fn with_url<T>(self, value: T) -> InlineQueryResultArticle
pub fn with_url<T>(self, value: T) -> InlineQueryResultArticle
Sets a new URL.
value
- URL of the result.
Trait Implementations§
source§impl Clone for InlineQueryResultArticle
impl Clone for InlineQueryResultArticle
source§fn clone(&self) -> InlineQueryResultArticle
fn clone(&self) -> InlineQueryResultArticle
Returns a copy 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 InlineQueryResultArticle
impl Debug for InlineQueryResultArticle
source§impl<'de> Deserialize<'de> for InlineQueryResultArticle
impl<'de> Deserialize<'de> for InlineQueryResultArticle
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<InlineQueryResultArticle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<InlineQueryResultArticle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<InlineQueryResultArticle> for InlineQueryResult
impl From<InlineQueryResultArticle> for InlineQueryResult
source§fn from(original: InlineQueryResultArticle) -> InlineQueryResult
fn from(original: InlineQueryResultArticle) -> InlineQueryResult
Converts to this type from the input type.
source§impl PartialEq for InlineQueryResultArticle
impl PartialEq for InlineQueryResultArticle
source§fn eq(&self, other: &InlineQueryResultArticle) -> bool
fn eq(&self, other: &InlineQueryResultArticle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for InlineQueryResultArticle
impl Serialize for InlineQueryResultArticle
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<RawInlineQueryResult> for InlineQueryResultArticle
impl TryFrom<RawInlineQueryResult> for InlineQueryResultArticle
source§fn try_from(
value: RawInlineQueryResult
) -> Result<InlineQueryResultArticle, <InlineQueryResultArticle as TryFrom<RawInlineQueryResult>>::Error>
fn try_from( value: RawInlineQueryResult ) -> Result<InlineQueryResultArticle, <InlineQueryResultArticle as TryFrom<RawInlineQueryResult>>::Error>
Performs the conversion.
impl StructuralPartialEq for InlineQueryResultArticle
Auto Trait Implementations§
impl Freeze for InlineQueryResultArticle
impl RefUnwindSafe for InlineQueryResultArticle
impl Send for InlineQueryResultArticle
impl Sync for InlineQueryResultArticle
impl Unpin for InlineQueryResultArticle
impl UnwindSafe for InlineQueryResultArticle
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> 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