pub struct InlineQueryResultContact {
pub tg_type: String,
pub id: String,
pub phone_number: String,
pub first_name: String,
pub last_name: Option<String>,
pub vcard: Option<String>,
pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
pub thumbnail_url: Option<String>,
pub thumbnail_width: Option<i64>,
pub thumbnail_height: Option<i64>,
}
Expand description
Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.
Fields§
§tg_type: String
Type of the result, must be contact
id: String
Unique identifier for this result, 1-64 Bytes
phone_number: String
Contact’s phone number
first_name: String
Contact’s first name
last_name: Option<String>
Optional. Contact’s last name
vcard: Option<String>
Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>
Optional. Inline keyboard attached to the message
input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>
Optional. Content of the message to be sent instead of the contact
thumbnail_url: Option<String>
Optional. Url of the thumbnail for the result
thumbnail_width: Option<i64>
Optional. Thumbnail width
thumbnail_height: Option<i64>
Optional. Thumbnail height
Implementations§
Source§impl InlineQueryResultContact
impl InlineQueryResultContact
pub fn noskip(self) -> NoSkipInlineQueryResultContact
Source§impl InlineQueryResultContact
impl InlineQueryResultContact
pub fn new(id: String, phone_number: String, first_name: String) -> Self
Sourcepub fn get_tg_type<'a>(&'a self) -> &'a str
pub fn get_tg_type<'a>(&'a self) -> &'a str
Type of the result, must be contact
Sourcepub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
Type of the result, must be contact
Sourcepub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self
pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self
Unique identifier for this result, 1-64 Bytes
Sourcepub fn get_phone_number<'a>(&'a self) -> &'a str
pub fn get_phone_number<'a>(&'a self) -> &'a str
Contact’s phone number
Sourcepub fn set_phone_number<'a>(&'a mut self, phone_number: String) -> &'a mut Self
pub fn set_phone_number<'a>(&'a mut self, phone_number: String) -> &'a mut Self
Contact’s phone number
Sourcepub fn get_first_name<'a>(&'a self) -> &'a str
pub fn get_first_name<'a>(&'a self) -> &'a str
Contact’s first name
Sourcepub fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self
pub fn set_first_name<'a>(&'a mut self, first_name: String) -> &'a mut Self
Contact’s first name
Sourcepub fn get_last_name<'a>(&'a self) -> Option<&'a str>
pub fn get_last_name<'a>(&'a self) -> Option<&'a str>
Optional. Contact’s last name
Sourcepub fn set_last_name<'a>(
&'a mut self,
last_name: Option<String>,
) -> &'a mut Self
pub fn set_last_name<'a>( &'a mut self, last_name: Option<String>, ) -> &'a mut Self
Optional. Contact’s last name
Sourcepub fn get_vcard<'a>(&'a self) -> Option<&'a str>
pub fn get_vcard<'a>(&'a self) -> Option<&'a str>
Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
Sourcepub fn set_vcard<'a>(&'a mut self, vcard: Option<String>) -> &'a mut Self
pub fn set_vcard<'a>(&'a mut self, vcard: Option<String>) -> &'a mut Self
Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
Sourcepub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>
pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>
Optional. Inline keyboard attached to the message
Sourcepub fn set_reply_markup<'a>(
&'a mut self,
reply_markup: Option<InlineKeyboardMarkup>,
) -> &'a mut Self
pub fn set_reply_markup<'a>( &'a mut self, reply_markup: Option<InlineKeyboardMarkup>, ) -> &'a mut Self
Optional. Inline keyboard attached to the message
Sourcepub fn get_input_message_content<'a>(
&'a self,
) -> Option<&'a InputMessageContent>
pub fn get_input_message_content<'a>( &'a self, ) -> Option<&'a InputMessageContent>
Optional. Content of the message to be sent instead of the contact
Sourcepub fn set_input_message_content<'a>(
&'a mut self,
input_message_content: Option<InputMessageContent>,
) -> &'a mut Self
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 contact
Sourcepub fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str>
pub fn get_thumbnail_url<'a>(&'a self) -> Option<&'a str>
Optional. Url of the thumbnail for the result
Sourcepub fn set_thumbnail_url<'a>(
&'a mut self,
thumbnail_url: Option<String>,
) -> &'a mut Self
pub fn set_thumbnail_url<'a>( &'a mut self, thumbnail_url: Option<String>, ) -> &'a mut Self
Optional. Url of the thumbnail for the result
Sourcepub fn get_thumbnail_width<'a>(&'a self) -> Option<i64>
pub fn get_thumbnail_width<'a>(&'a self) -> Option<i64>
Optional. Thumbnail width
Sourcepub fn set_thumbnail_width<'a>(
&'a mut self,
thumbnail_width: Option<i64>,
) -> &'a mut Self
pub fn set_thumbnail_width<'a>( &'a mut self, thumbnail_width: Option<i64>, ) -> &'a mut Self
Optional. Thumbnail width
Sourcepub fn get_thumbnail_height<'a>(&'a self) -> Option<i64>
pub fn get_thumbnail_height<'a>(&'a self) -> Option<i64>
Optional. Thumbnail height
Sourcepub fn set_thumbnail_height<'a>(
&'a mut self,
thumbnail_height: Option<i64>,
) -> &'a mut Self
pub fn set_thumbnail_height<'a>( &'a mut self, thumbnail_height: Option<i64>, ) -> &'a mut Self
Optional. Thumbnail height
Trait Implementations§
Source§impl Clone for InlineQueryResultContact
impl Clone for InlineQueryResultContact
Source§fn clone(&self) -> InlineQueryResultContact
fn clone(&self) -> InlineQueryResultContact
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InlineQueryResultContact
impl Debug for InlineQueryResultContact
Source§impl Default for InlineQueryResultContact
impl Default for InlineQueryResultContact
Source§fn default() -> InlineQueryResultContact
fn default() -> InlineQueryResultContact
Source§impl<'de> Deserialize<'de> for InlineQueryResultContact
impl<'de> Deserialize<'de> for InlineQueryResultContact
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<BoxWrapper<Box<InlineQueryResultContact>>> for InlineQueryResultContact
impl From<BoxWrapper<Box<InlineQueryResultContact>>> for InlineQueryResultContact
Source§fn from(t: BoxWrapper<Box<InlineQueryResultContact>>) -> Self
fn from(t: BoxWrapper<Box<InlineQueryResultContact>>) -> Self
Source§impl From<BoxWrapper<Unbox<InlineQueryResultContact>>> for InlineQueryResultContact
impl From<BoxWrapper<Unbox<InlineQueryResultContact>>> for InlineQueryResultContact
Source§fn from(t: BoxWrapper<Unbox<InlineQueryResultContact>>) -> Self
fn from(t: BoxWrapper<Unbox<InlineQueryResultContact>>) -> Self
Source§impl From<NoSkipInlineQueryResultContact> for InlineQueryResultContact
impl From<NoSkipInlineQueryResultContact> for InlineQueryResultContact
Source§fn from(t: NoSkipInlineQueryResultContact) -> Self
fn from(t: NoSkipInlineQueryResultContact) -> Self
Source§impl Hash for InlineQueryResultContact
impl Hash for InlineQueryResultContact
Source§impl Into<NoSkipInlineQueryResultContact> for InlineQueryResultContact
impl Into<NoSkipInlineQueryResultContact> for InlineQueryResultContact
Source§fn into(self) -> NoSkipInlineQueryResultContact
fn into(self) -> NoSkipInlineQueryResultContact
Source§impl Ord for InlineQueryResultContact
impl Ord for InlineQueryResultContact
Source§fn cmp(&self, other: &InlineQueryResultContact) -> Ordering
fn cmp(&self, other: &InlineQueryResultContact) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for InlineQueryResultContact
impl PartialEq for InlineQueryResultContact
Source§impl PartialOrd for InlineQueryResultContact
impl PartialOrd for InlineQueryResultContact
Source§impl Serialize for InlineQueryResultContact
impl Serialize for InlineQueryResultContact
impl Eq for InlineQueryResultContact
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.