pub struct TelegramLinkRequestBody {
pub captcha_token: Option<String>,
pub mode: Option<TelegramLinkRequestBodyMode>,
pub telegram_auth_result: Option<TelegramLinkRequestBodyTelegramAuthResult>,
pub telegram_web_app_data: Option<TelegramLinkRequestBodyTelegramWebAppData>,
}Expand description
The request body for linking a Telegram account.
JSON schema
{
"title": "TelegramLinkRequestBody",
"description": "The request body for linking a Telegram account.",
"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<TelegramLinkRequestBodyMode>§telegram_auth_result: Option<TelegramLinkRequestBodyTelegramAuthResult>§telegram_web_app_data: Option<TelegramLinkRequestBodyTelegramWebAppData>Trait Implementations§
Source§impl Clone for TelegramLinkRequestBody
impl Clone for TelegramLinkRequestBody
Source§fn clone(&self) -> TelegramLinkRequestBody
fn clone(&self) -> TelegramLinkRequestBody
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 TelegramLinkRequestBody
impl Debug for TelegramLinkRequestBody
Source§impl Default for TelegramLinkRequestBody
impl Default for TelegramLinkRequestBody
Source§impl<'de> Deserialize<'de> for TelegramLinkRequestBody
impl<'de> Deserialize<'de> for TelegramLinkRequestBody
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<&TelegramLinkRequestBody> for TelegramLinkRequestBody
impl From<&TelegramLinkRequestBody> for TelegramLinkRequestBody
Source§fn from(value: &TelegramLinkRequestBody) -> Self
fn from(value: &TelegramLinkRequestBody) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TelegramLinkRequestBody
impl RefUnwindSafe for TelegramLinkRequestBody
impl Send for TelegramLinkRequestBody
impl Sync for TelegramLinkRequestBody
impl Unpin for TelegramLinkRequestBody
impl UnsafeUnpin for TelegramLinkRequestBody
impl UnwindSafe for TelegramLinkRequestBody
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