pub struct ChatShared {
pub request_id: i64,
pub chat_id: i64,
pub title: Option<String>,
pub username: Option<String>,
pub photo: Option<Vec<PhotoSize>>,
}Expand description
This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.
Fields§
§request_id: i64Identifier of the request
chat_id: i64Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.
title: Option<String>Optional. Title of the chat, if the title was requested by the bot.
username: Option<String>Optional. Username of the chat, if the username was requested by the bot and available.
photo: Option<Vec<PhotoSize>>Optional. Available sizes of the chat photo, if the photo was requested by the bot
Implementations§
pub fn noskip(self) -> NoSkipChatShared
pub fn new(request_id: i64, chat_id: i64) -> Self
Sourcepub fn get_request_id<'a>(&'a self) -> i64
pub fn get_request_id<'a>(&'a self) -> i64
Identifier of the request
Sourcepub fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self
pub fn set_request_id<'a>(&'a mut self, request_id: i64) -> &'a mut Self
Identifier of the request
Sourcepub fn get_chat_id<'a>(&'a self) -> i64
pub fn get_chat_id<'a>(&'a self) -> i64
Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.
Sourcepub fn set_chat_id<'a>(&'a mut self, chat_id: i64) -> &'a mut Self
pub fn set_chat_id<'a>(&'a mut self, chat_id: i64) -> &'a mut Self
Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.
Sourcepub fn get_title<'a>(&'a self) -> Option<&'a str>
pub fn get_title<'a>(&'a self) -> Option<&'a str>
Optional. Title of the chat, if the title was requested by the bot.
Sourcepub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self
pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self
Optional. Title of the chat, if the title was requested by the bot.
Sourcepub fn get_username<'a>(&'a self) -> Option<&'a str>
pub fn get_username<'a>(&'a self) -> Option<&'a str>
Optional. Username of the chat, if the username was requested by the bot and available.
Sourcepub fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self
pub fn set_username<'a>(&'a mut self, username: Option<String>) -> &'a mut Self
Optional. Username of the chat, if the username was requested by the bot and available.
Trait Implementations§
Source§fn clone(&self) -> ChatShared
fn clone(&self) -> ChatShared
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§fn default() -> ChatShared
fn default() -> ChatShared
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>,
Source§fn from(t: BoxWrapper<Box<ChatShared>>) -> Self
fn from(t: BoxWrapper<Box<ChatShared>>) -> Self
Source§fn from(t: BoxWrapper<Unbox<ChatShared>>) -> Self
fn from(t: BoxWrapper<Unbox<ChatShared>>) -> Self
Source§fn from(t: NoSkipChatShared) -> Self
fn from(t: NoSkipChatShared) -> Self
Source§fn into(self) -> NoSkipChatShared
fn into(self) -> NoSkipChatShared
Source§fn cmp(&self, other: &ChatShared) -> Ordering
fn cmp(&self, other: &ChatShared) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Auto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.