Struct botapi::gen_types::InlineQueryResultContactBuilder
source · pub struct InlineQueryResultContactBuilder { /* 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 input_message_content to send a message with the specified content instead of the contact.Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Implementations§
source§impl InlineQueryResultContactBuilder
impl InlineQueryResultContactBuilder
pub fn new(id: String, phone_number: String, first_name: String) -> Self
sourcepub fn set_phone_number(self, phone_number: String) -> Self
pub fn set_phone_number(self, phone_number: String) -> Self
Contact’s phone number
sourcepub fn set_first_name(self, first_name: String) -> Self
pub fn set_first_name(self, first_name: String) -> Self
Contact’s first name
sourcepub fn set_last_name(self, last_name: String) -> Self
pub fn set_last_name(self, last_name: String) -> Self
Optional. Contact’s last name
sourcepub fn set_vcard(self, vcard: String) -> Self
pub fn set_vcard(self, vcard: String) -> Self
Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
sourcepub fn set_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
pub fn set_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
Optional. Inline keyboard attached to the message
sourcepub fn set_input_message_content(
self,
input_message_content: InputMessageContent
) -> Self
pub fn set_input_message_content(
self,
input_message_content: InputMessageContent
) -> Self
Optional. Content of the message to be sent instead of the contact
sourcepub fn set_thumb_url(self, thumb_url: String) -> Self
pub fn set_thumb_url(self, thumb_url: String) -> Self
Optional. Url of the thumbnail for the result
sourcepub fn set_thumb_width(self, thumb_width: i64) -> Self
pub fn set_thumb_width(self, thumb_width: i64) -> Self
Optional. Thumbnail width
sourcepub fn set_thumb_height(self, thumb_height: i64) -> Self
pub fn set_thumb_height(self, thumb_height: i64) -> Self
Optional. Thumbnail height
pub fn build(self) -> InlineQueryResultContact
Trait Implementations§
source§impl Clone for InlineQueryResultContactBuilder
impl Clone for InlineQueryResultContactBuilder
source§fn clone(&self) -> InlineQueryResultContactBuilder
fn clone(&self) -> InlineQueryResultContactBuilder
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 Default for InlineQueryResultContactBuilder
impl Default for InlineQueryResultContactBuilder
source§fn default() -> InlineQueryResultContactBuilder
fn default() -> InlineQueryResultContactBuilder
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for InlineQueryResultContactBuilder
impl<'de> Deserialize<'de> for InlineQueryResultContactBuilder
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>,
Deserialize this value from the given Serde deserializer. Read more