pub struct Contact {
pub first_name: String,
pub phone_number: String,
pub last_name: Option<String>,
pub user_id: Option<i64>,
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<i64>
Identifier in Telegram.
vcard: Option<String>
Additional data in the form of a vCard.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Contact
impl<'de> Deserialize<'de> for Contact
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Contact, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Contact, <__D as Deserializer<'de>>::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§fn from(value: Contact) -> InputMessageContent
fn from(value: Contact) -> InputMessageContent
Converts to this type from the input type.
source§impl From<Contact> for InputMessageContentContact
impl From<Contact> for InputMessageContentContact
source§fn from(value: Contact) -> InputMessageContentContact
fn from(value: Contact) -> InputMessageContentContact
Converts to this type from the input type.
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 moresource§impl Serialize for Contact
impl Serialize for Contact
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
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
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