pub struct Contact {
pub raw: MessageMediaContact,
}Fields§
§raw: MessageMediaContactImplementations§
Source§impl Contact
impl Contact
pub fn from_raw_media(contact: MessageMediaContact) -> Self
pub fn to_raw_input_media(&self) -> InputMediaContact
Sourcepub fn phone_number(&self) -> &str
pub fn phone_number(&self) -> &str
The contact’s phone number, in international format. This field will always be a non-empty string of digits, although there’s no guarantee that the number actually exists.
Sourcepub fn first_name(&self) -> &str
pub fn first_name(&self) -> &str
The contact’s first name. Although official clients will always send a non-empty string, it is possible for this field to be empty when sent via different means.
Sourcepub fn last_name(&self) -> &str
pub fn last_name(&self) -> &str
The contact’s last name. May be empty if it’s not set by sender.
Sourcepub fn vcard(&self) -> &str
pub fn vcard(&self) -> &str
Contact information in vCard format. Applications such as Telegram Desktop leave this field empty. The vCard version used in this field could be any. The field may also contain arbitrary text when sent by non-official clients.
Trait Implementations§
impl StructuralPartialEq for Contact
Auto Trait Implementations§
impl Freeze for Contact
impl RefUnwindSafe for Contact
impl Send for Contact
impl Sync for Contact
impl Unpin for Contact
impl UnwindSafe for Contact
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