Struct carapax::types::InlineQueryResultContact
source · pub struct InlineQueryResultContact { /* private fields */ }
Expand description
Represents a contact with a phone number.
By default, this contact will be sent by the user. Alternatively, you can use Self::with_input_message_content to send a message with the specified content instead of the contact.
Implementations§
source§impl InlineQueryResultContact
impl InlineQueryResultContact
sourcepub fn new<A, B, C>(
first_name: A,
id: B,
phone_number: C
) -> InlineQueryResultContact
pub fn new<A, B, C>( first_name: A, id: B, phone_number: C ) -> InlineQueryResultContact
Creates a new InlineQueryResultContact
.
§Arguments
first_name
- Contact’s first name.id
- Unique identifier of the result; 1-64 bytes.phone_number
- Contact’s phone number.
sourcepub fn with_input_message_content<T>(self, value: T) -> InlineQueryResultContactwhere
T: Into<InputMessageContent>,
pub fn with_input_message_content<T>(self, value: T) -> InlineQueryResultContactwhere
T: Into<InputMessageContent>,
Sets a new input message content.
§Arguments
value
- Content of the message to be sent instead of the contact.
sourcepub fn with_last_name<T>(self, value: T) -> InlineQueryResultContact
pub fn with_last_name<T>(self, value: T) -> InlineQueryResultContact
sourcepub fn with_reply_markup<T>(self, value: T) -> InlineQueryResultContactwhere
T: Into<InlineKeyboardMarkup>,
pub fn with_reply_markup<T>(self, value: T) -> InlineQueryResultContactwhere
T: Into<InlineKeyboardMarkup>,
sourcepub fn with_thumbnail_height(self, value: i64) -> InlineQueryResultContact
pub fn with_thumbnail_height(self, value: i64) -> InlineQueryResultContact
sourcepub fn with_thumbnail_url<T>(self, value: T) -> InlineQueryResultContact
pub fn with_thumbnail_url<T>(self, value: T) -> InlineQueryResultContact
sourcepub fn with_thumbnail_width(self, value: i64) -> InlineQueryResultContact
pub fn with_thumbnail_width(self, value: i64) -> InlineQueryResultContact
sourcepub fn with_vcard<T>(self, value: T) -> InlineQueryResultContact
pub fn with_vcard<T>(self, value: T) -> InlineQueryResultContact
Sets a new vCard.
§Arguments
value
- Additional data about the contact in the form of a vCard; 0-2048 bytes.
Trait Implementations§
source§impl Clone for InlineQueryResultContact
impl Clone for InlineQueryResultContact
source§fn clone(&self) -> InlineQueryResultContact
fn clone(&self) -> InlineQueryResultContact
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 InlineQueryResultContact
impl Debug for InlineQueryResultContact
source§impl<'de> Deserialize<'de> for InlineQueryResultContact
impl<'de> Deserialize<'de> for InlineQueryResultContact
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<InlineQueryResultContact, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<InlineQueryResultContact, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<InlineQueryResultContact> for InlineQueryResult
impl From<InlineQueryResultContact> for InlineQueryResult
source§fn from(original: InlineQueryResultContact) -> InlineQueryResult
fn from(original: InlineQueryResultContact) -> InlineQueryResult
Converts to this type from the input type.
source§impl PartialEq for InlineQueryResultContact
impl PartialEq for InlineQueryResultContact
source§fn eq(&self, other: &InlineQueryResultContact) -> bool
fn eq(&self, other: &InlineQueryResultContact) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for InlineQueryResultContact
impl Serialize for InlineQueryResultContact
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 InlineQueryResultContact
impl TryFrom<RawInlineQueryResult> for InlineQueryResultContact
source§fn try_from(
value: RawInlineQueryResult
) -> Result<InlineQueryResultContact, <InlineQueryResultContact as TryFrom<RawInlineQueryResult>>::Error>
fn try_from( value: RawInlineQueryResult ) -> Result<InlineQueryResultContact, <InlineQueryResultContact as TryFrom<RawInlineQueryResult>>::Error>
Performs the conversion.
impl StructuralPartialEq for InlineQueryResultContact
Auto Trait Implementations§
impl Freeze for InlineQueryResultContact
impl RefUnwindSafe for InlineQueryResultContact
impl Send for InlineQueryResultContact
impl Sync for InlineQueryResultContact
impl Unpin for InlineQueryResultContact
impl UnwindSafe for InlineQueryResultContact
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