pub struct KeyboardButtonRequestChat {
pub request_id: i64,
pub chat_is_channel: bool,
pub chat_is_forum: Option<bool>,
pub chat_has_username: Option<bool>,
pub chat_is_created: Option<bool>,
pub user_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>,
pub bot_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>,
pub bot_is_member: Option<bool>,
pub request_title: Option<bool>,
pub request_username: Option<bool>,
pub request_photo: Option<bool>,
}Expand description
This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. More about requesting chats: https://core.telegram.org/bots/features#chat-and-user-selection.
Fields§
§request_id: i64Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message
chat_is_channel: boolPass True to request a channel chat, pass False to request a group or a supergroup chat.
chat_is_forum: Option<bool>Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.
chat_has_username: Option<bool>Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.
chat_is_created: Option<bool>Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
user_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.
bot_administrator_rights: Option<BoxWrapper<Unbox<ChatAdministratorRights>>>Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.
bot_is_member: Option<bool>Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
request_title: Option<bool>Optional. Pass True to request the chat’s title
request_username: Option<bool>Optional. Pass True to request the chat’s username
request_photo: Option<bool>Optional. Pass True to request the chat’s photo
Implementations§
Source§impl KeyboardButtonRequestChat
impl KeyboardButtonRequestChat
pub fn noskip(self) -> NoSkipKeyboardButtonRequestChat
Source§impl KeyboardButtonRequestChat
impl KeyboardButtonRequestChat
pub fn new(request_id: i64, chat_is_channel: bool) -> Self
Sourcepub fn get_request_id<'a>(&'a self) -> i64
pub fn get_request_id<'a>(&'a self) -> i64
Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message
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
Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message
Sourcepub fn get_chat_is_channel<'a>(&'a self) -> bool
pub fn get_chat_is_channel<'a>(&'a self) -> bool
Pass True to request a channel chat, pass False to request a group or a supergroup chat.
Sourcepub fn set_chat_is_channel<'a>(
&'a mut self,
chat_is_channel: bool,
) -> &'a mut Self
pub fn set_chat_is_channel<'a>( &'a mut self, chat_is_channel: bool, ) -> &'a mut Self
Pass True to request a channel chat, pass False to request a group or a supergroup chat.
Sourcepub fn get_chat_is_forum<'a>(&'a self) -> Option<bool>
pub fn get_chat_is_forum<'a>(&'a self) -> Option<bool>
Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.
Sourcepub fn set_chat_is_forum<'a>(
&'a mut self,
chat_is_forum: Option<bool>,
) -> &'a mut Self
pub fn set_chat_is_forum<'a>( &'a mut self, chat_is_forum: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.
Sourcepub fn get_chat_has_username<'a>(&'a self) -> Option<bool>
pub fn get_chat_has_username<'a>(&'a self) -> Option<bool>
Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.
Sourcepub fn set_chat_has_username<'a>(
&'a mut self,
chat_has_username: Option<bool>,
) -> &'a mut Self
pub fn set_chat_has_username<'a>( &'a mut self, chat_has_username: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.
Sourcepub fn get_chat_is_created<'a>(&'a self) -> Option<bool>
pub fn get_chat_is_created<'a>(&'a self) -> Option<bool>
Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
Sourcepub fn set_chat_is_created<'a>(
&'a mut self,
chat_is_created: Option<bool>,
) -> &'a mut Self
pub fn set_chat_is_created<'a>( &'a mut self, chat_is_created: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
Sourcepub fn get_user_administrator_rights<'a>(
&'a self,
) -> Option<&'a ChatAdministratorRights>
pub fn get_user_administrator_rights<'a>( &'a self, ) -> Option<&'a ChatAdministratorRights>
Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.
Sourcepub fn set_user_administrator_rights<'a>(
&'a mut self,
user_administrator_rights: Option<ChatAdministratorRights>,
) -> &'a mut Self
pub fn set_user_administrator_rights<'a>( &'a mut self, user_administrator_rights: Option<ChatAdministratorRights>, ) -> &'a mut Self
Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.
Sourcepub fn get_bot_administrator_rights<'a>(
&'a self,
) -> Option<&'a ChatAdministratorRights>
pub fn get_bot_administrator_rights<'a>( &'a self, ) -> Option<&'a ChatAdministratorRights>
Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.
Sourcepub fn set_bot_administrator_rights<'a>(
&'a mut self,
bot_administrator_rights: Option<ChatAdministratorRights>,
) -> &'a mut Self
pub fn set_bot_administrator_rights<'a>( &'a mut self, bot_administrator_rights: Option<ChatAdministratorRights>, ) -> &'a mut Self
Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.
Sourcepub fn get_bot_is_member<'a>(&'a self) -> Option<bool>
pub fn get_bot_is_member<'a>(&'a self) -> Option<bool>
Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
Sourcepub fn set_bot_is_member<'a>(
&'a mut self,
bot_is_member: Option<bool>,
) -> &'a mut Self
pub fn set_bot_is_member<'a>( &'a mut self, bot_is_member: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
Sourcepub fn get_request_title<'a>(&'a self) -> Option<bool>
pub fn get_request_title<'a>(&'a self) -> Option<bool>
Optional. Pass True to request the chat’s title
Sourcepub fn set_request_title<'a>(
&'a mut self,
request_title: Option<bool>,
) -> &'a mut Self
pub fn set_request_title<'a>( &'a mut self, request_title: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request the chat’s title
Sourcepub fn get_request_username<'a>(&'a self) -> Option<bool>
pub fn get_request_username<'a>(&'a self) -> Option<bool>
Optional. Pass True to request the chat’s username
Sourcepub fn set_request_username<'a>(
&'a mut self,
request_username: Option<bool>,
) -> &'a mut Self
pub fn set_request_username<'a>( &'a mut self, request_username: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request the chat’s username
Sourcepub fn get_request_photo<'a>(&'a self) -> Option<bool>
pub fn get_request_photo<'a>(&'a self) -> Option<bool>
Optional. Pass True to request the chat’s photo
Sourcepub fn set_request_photo<'a>(
&'a mut self,
request_photo: Option<bool>,
) -> &'a mut Self
pub fn set_request_photo<'a>( &'a mut self, request_photo: Option<bool>, ) -> &'a mut Self
Optional. Pass True to request the chat’s photo
Trait Implementations§
Source§impl Clone for KeyboardButtonRequestChat
impl Clone for KeyboardButtonRequestChat
Source§fn clone(&self) -> KeyboardButtonRequestChat
fn clone(&self) -> KeyboardButtonRequestChat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KeyboardButtonRequestChat
impl Debug for KeyboardButtonRequestChat
Source§impl Default for KeyboardButtonRequestChat
impl Default for KeyboardButtonRequestChat
Source§fn default() -> KeyboardButtonRequestChat
fn default() -> KeyboardButtonRequestChat
Source§impl<'de> Deserialize<'de> for KeyboardButtonRequestChat
impl<'de> Deserialize<'de> for KeyboardButtonRequestChat
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§impl From<BoxWrapper<Box<KeyboardButtonRequestChat>>> for KeyboardButtonRequestChat
impl From<BoxWrapper<Box<KeyboardButtonRequestChat>>> for KeyboardButtonRequestChat
Source§fn from(t: BoxWrapper<Box<KeyboardButtonRequestChat>>) -> Self
fn from(t: BoxWrapper<Box<KeyboardButtonRequestChat>>) -> Self
Source§impl From<BoxWrapper<Unbox<KeyboardButtonRequestChat>>> for KeyboardButtonRequestChat
impl From<BoxWrapper<Unbox<KeyboardButtonRequestChat>>> for KeyboardButtonRequestChat
Source§fn from(t: BoxWrapper<Unbox<KeyboardButtonRequestChat>>) -> Self
fn from(t: BoxWrapper<Unbox<KeyboardButtonRequestChat>>) -> Self
Source§impl From<NoSkipKeyboardButtonRequestChat> for KeyboardButtonRequestChat
impl From<NoSkipKeyboardButtonRequestChat> for KeyboardButtonRequestChat
Source§fn from(t: NoSkipKeyboardButtonRequestChat) -> Self
fn from(t: NoSkipKeyboardButtonRequestChat) -> Self
Source§impl Hash for KeyboardButtonRequestChat
impl Hash for KeyboardButtonRequestChat
Source§impl Into<NoSkipKeyboardButtonRequestChat> for KeyboardButtonRequestChat
impl Into<NoSkipKeyboardButtonRequestChat> for KeyboardButtonRequestChat
Source§fn into(self) -> NoSkipKeyboardButtonRequestChat
fn into(self) -> NoSkipKeyboardButtonRequestChat
Source§impl Ord for KeyboardButtonRequestChat
impl Ord for KeyboardButtonRequestChat
Source§fn cmp(&self, other: &KeyboardButtonRequestChat) -> Ordering
fn cmp(&self, other: &KeyboardButtonRequestChat) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for KeyboardButtonRequestChat
impl PartialOrd for KeyboardButtonRequestChat
impl Eq for KeyboardButtonRequestChat
impl StructuralPartialEq for KeyboardButtonRequestChat
Auto Trait Implementations§
impl Freeze for KeyboardButtonRequestChat
impl RefUnwindSafe for KeyboardButtonRequestChat
impl Send for KeyboardButtonRequestChat
impl Sync for KeyboardButtonRequestChat
impl Unpin for KeyboardButtonRequestChat
impl UnsafeUnpin for KeyboardButtonRequestChat
impl UnwindSafe for KeyboardButtonRequestChat
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.