pub struct User {Show 14 fields
pub id: i64,
pub first_name: Option<String>,
pub last_name: Option<String>,
pub username: Option<String>,
pub phone_number: Option<String>,
pub email: Option<String>,
pub min: Option<bool>,
pub status: Option<UserStatus>,
pub profile_photo: Option<UserProfilePhoto>,
pub pending_setup: Option<bool>,
pub time_zone: Option<String>,
pub bot: Option<bool>,
pub bot_avatar: Option<BotAvatar>,
pub bio: Option<String>,
}Fields§
§id: i64§first_name: Option<String>§last_name: Option<String>§username: Option<String>§phone_number: Option<String>§email: Option<String>§min: Option<bool>If true, certain fields such as email or phone_number will be missing
status: Option<UserStatus>§profile_photo: Option<UserProfilePhoto>§pending_setup: Option<bool>If true, the user has not completed the setup process
time_zone: Option<String>§bot: Option<bool>§bot_avatar: Option<BotAvatar>§bio: Option<String>Implementations§
Source§impl User
impl User
Sourcepub fn first_name(&self) -> &str
pub fn first_name(&self) -> &str
Returns the value of first_name, or the default value if first_name is unset.
Sourcepub fn last_name(&self) -> &str
pub fn last_name(&self) -> &str
Returns the value of last_name, or the default value if last_name is unset.
Sourcepub fn username(&self) -> &str
pub fn username(&self) -> &str
Returns the value of username, or the default value if username is unset.
Sourcepub fn phone_number(&self) -> &str
pub fn phone_number(&self) -> &str
Returns the value of phone_number, or the default value if phone_number is unset.
Sourcepub fn email(&self) -> &str
pub fn email(&self) -> &str
Returns the value of email, or the default value if email is unset.
Sourcepub fn pending_setup(&self) -> bool
pub fn pending_setup(&self) -> bool
Returns the value of pending_setup, or the default value if pending_setup is unset.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<User, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<User, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for User
impl Message for User
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl Serialize for User
impl Serialize for User
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 User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnsafeUnpin for User
impl UnwindSafe for User
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