pub struct TelegramAuthentication {
pub auth_date: i64,
pub first_name: Option<String>,
pub id: i64,
pub last_name: Option<String>,
pub photo_url: Option<String>,
pub type_: OAuth2ProviderType,
pub username: Option<String>,
}Expand description
Information about an end user who authenticates using Telegram.
JSON schema
{
"description": "Information about an end user who authenticates using Telegram.",
"type": "object",
"required": [
"authDate",
"id",
"type"
],
"properties": {
"authDate": {
"description": "The Telegram user's last login as a Unix timestamp.",
"examples": [
1770681412
],
"type": "integer"
},
"firstName": {
"description": "The Telegram user's first name.",
"examples": [
"Satoshi"
],
"type": "string"
},
"id": {
"description": "The Telegram ID for the end user.",
"examples": [
123456
],
"type": "integer"
},
"lastName": {
"description": "The Telegram user's last name.",
"examples": [
"Nakamoto"
],
"type": "string"
},
"photoUrl": {
"description": "The Telegram user's profile picture.",
"examples": [
"https://image.url/profile.png"
],
"type": "string"
},
"type": {
"$ref": "#/components/schemas/OAuth2ProviderType"
},
"username": {
"description": "The Telegram user's username.",
"examples": [
"satoshinakamoto"
],
"type": "string"
}
}
}Fields§
§auth_date: i64The Telegram user’s last login as a Unix timestamp.
first_name: Option<String>The Telegram user’s first name.
id: i64The Telegram ID for the end user.
last_name: Option<String>The Telegram user’s last name.
photo_url: Option<String>The Telegram user’s profile picture.
type_: OAuth2ProviderType§username: Option<String>The Telegram user’s username.
Implementations§
Source§impl TelegramAuthentication
impl TelegramAuthentication
pub fn builder() -> TelegramAuthentication
Trait Implementations§
Source§impl Clone for TelegramAuthentication
impl Clone for TelegramAuthentication
Source§fn clone(&self) -> TelegramAuthentication
fn clone(&self) -> TelegramAuthentication
Returns a duplicate 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 Debug for TelegramAuthentication
impl Debug for TelegramAuthentication
Source§impl<'de> Deserialize<'de> for TelegramAuthentication
impl<'de> Deserialize<'de> for TelegramAuthentication
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<&TelegramAuthentication> for TelegramAuthentication
impl From<&TelegramAuthentication> for TelegramAuthentication
Source§fn from(value: &TelegramAuthentication) -> Self
fn from(value: &TelegramAuthentication) -> Self
Converts to this type from the input type.
Source§impl From<TelegramAuthentication> for AuthenticationMethod
impl From<TelegramAuthentication> for AuthenticationMethod
Source§fn from(value: TelegramAuthentication) -> Self
fn from(value: TelegramAuthentication) -> Self
Converts to this type from the input type.
Source§impl From<TelegramAuthentication> for TelegramAuthentication
impl From<TelegramAuthentication> for TelegramAuthentication
Source§fn from(value: TelegramAuthentication) -> Self
fn from(value: TelegramAuthentication) -> Self
Converts to this type from the input type.
Source§impl Serialize for TelegramAuthentication
impl Serialize for TelegramAuthentication
Source§impl TryFrom<TelegramAuthentication> for TelegramAuthentication
impl TryFrom<TelegramAuthentication> for TelegramAuthentication
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: TelegramAuthentication) -> Result<Self, ConversionError>
fn try_from(value: TelegramAuthentication) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for TelegramAuthentication
impl RefUnwindSafe for TelegramAuthentication
impl Send for TelegramAuthentication
impl Sync for TelegramAuthentication
impl Unpin for TelegramAuthentication
impl UnsafeUnpin for TelegramAuthentication
impl UnwindSafe for TelegramAuthentication
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