pub struct Contact {
pub first_name: String,
pub phone_number: String,
pub last_name: Option<String>,
pub user_id: Option<Integer>,
pub vcard: Option<String>,
}
Expand description
Represents a phone contact.
Fields§
§first_name: String
First name.
phone_number: String
Phone number.
last_name: Option<String>
Last name.
user_id: Option<Integer>
Identifier in Telegram.
vcard: Option<String>
Additional data in the form of a vCard.
Implementations§
source§impl Contact
impl Contact
sourcepub fn with_last_name<T>(self, value: T) -> Self
pub fn with_last_name<T>(self, value: T) -> Self
sourcepub fn with_user_id(self, value: Integer) -> Self
pub fn with_user_id(self, value: Integer) -> Self
sourcepub fn with_vcard<T>(self, value: T) -> Self
pub fn with_vcard<T>(self, value: T) -> Self
Sets a new vCard.
§Arguments
value
- Additional data about the contact in the form of a vCard; 0-2048 bytes.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Contact
impl<'de> Deserialize<'de> for Contact
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
source§impl From<Contact> for ExternalReplyData
impl From<Contact> for ExternalReplyData
source§fn from(original: Contact) -> ExternalReplyData
fn from(original: Contact) -> ExternalReplyData
Converts to this type from the input type.
source§impl From<Contact> for InputMessageContent
impl From<Contact> for InputMessageContent
source§impl From<Contact> for InputMessageContentContact
impl From<Contact> for InputMessageContentContact
source§impl PartialEq for Contact
impl PartialEq for Contact
source§impl PartialOrd for Contact
impl PartialOrd for Contact
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl 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
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