pub struct TelegramAuthenticateRequestBody {
pub captcha_token: Option<String>,
pub mode: Option<TelegramAuthenticateRequestBodyMode>,
pub telegram_auth_result: Option<TelegramAuthenticateRequestBodyTelegramAuthResult>,
pub telegram_web_app_data: Option<TelegramAuthenticateRequestBodyTelegramWebAppData>,
}Expand description
The request body for authenticating with Telegram.
JSON schema
{
"title": "TelegramAuthenticateRequestBody",
"description": "The request body for authenticating with Telegram.",
"type": "object",
"properties": {
"captcha_token": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"login-or-sign-up",
"no-signup"
]
},
"telegram_auth_result": {
"type": "object",
"required": [
"auth_date",
"first_name",
"hash",
"id"
],
"properties": {
"auth_date": {
"type": [
"number",
"null"
]
},
"first_name": {
"type": "string"
},
"hash": {
"type": "string"
},
"id": {
"type": [
"number",
"null"
]
},
"last_name": {
"type": "string"
},
"photo_url": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"telegram_web_app_data": {
"type": "object",
"required": [
"auth_date",
"hash",
"user"
],
"properties": {
"auth_date": {
"type": [
"number",
"null"
]
},
"chat_instance": {
"type": "string"
},
"chat_type": {
"type": "string"
},
"hash": {
"type": "string"
},
"query_id": {
"type": "string"
},
"signature": {
"type": "string"
},
"start_param": {
"type": "string"
},
"user": {
"type": "string"
}
}
}
}
}Fields§
§captcha_token: Option<String>§mode: Option<TelegramAuthenticateRequestBodyMode>§telegram_auth_result: Option<TelegramAuthenticateRequestBodyTelegramAuthResult>§telegram_web_app_data: Option<TelegramAuthenticateRequestBodyTelegramWebAppData>Trait Implementations§
Source§impl Clone for TelegramAuthenticateRequestBody
impl Clone for TelegramAuthenticateRequestBody
Source§fn clone(&self) -> TelegramAuthenticateRequestBody
fn clone(&self) -> TelegramAuthenticateRequestBody
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 Default for TelegramAuthenticateRequestBody
impl Default for TelegramAuthenticateRequestBody
Source§fn default() -> TelegramAuthenticateRequestBody
fn default() -> TelegramAuthenticateRequestBody
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TelegramAuthenticateRequestBody
impl<'de> Deserialize<'de> for TelegramAuthenticateRequestBody
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TelegramAuthenticateRequestBody, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TelegramAuthenticateRequestBody, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&TelegramAuthenticateRequestBody> for TelegramAuthenticateRequestBody
impl From<&TelegramAuthenticateRequestBody> for TelegramAuthenticateRequestBody
Source§fn from(
value: &TelegramAuthenticateRequestBody,
) -> TelegramAuthenticateRequestBody
fn from( value: &TelegramAuthenticateRequestBody, ) -> TelegramAuthenticateRequestBody
Converts to this type from the input type.
Source§impl Serialize for TelegramAuthenticateRequestBody
impl Serialize for TelegramAuthenticateRequestBody
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
Auto Trait Implementations§
impl Freeze for TelegramAuthenticateRequestBody
impl RefUnwindSafe for TelegramAuthenticateRequestBody
impl Send for TelegramAuthenticateRequestBody
impl Sync for TelegramAuthenticateRequestBody
impl Unpin for TelegramAuthenticateRequestBody
impl UnwindSafe for TelegramAuthenticateRequestBody
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