pub struct KeyboardButtonRequestUsers {
pub request_id: RequestId,
pub user_is_bot: Option<bool>,
pub user_is_premium: Option<bool>,
pub max_quantity: u8,
pub request_name: bool,
pub request_username: bool,
pub request_photo: bool,
}Expand description
This object defines the criteria used to request a suitable users.
Information about the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users »
Fields§
§request_id: RequestIdIdentifier of the request, which will be received back in the
UsersShared object. Must be unique within the message.
user_is_bot: Option<bool>Pass true to request a bot, pass false to request a regular user. If
not specified, no additional restrictions are applied.
Pass true to request a premium user, pass false to request a
non-premium user. If not specified, no additional restrictions are
applied.
max_quantity: u8The maximum number of users to be selected; 1-10. Defaults to 1.
request_name: boolPass true to request the users’ first and last names
request_username: boolPass true to request the users’ username
request_photo: boolPass true to request the users’ photos
Implementations§
Source§impl KeyboardButtonRequestUsers
impl KeyboardButtonRequestUsers
Sourcepub fn new(request_id: RequestId) -> KeyboardButtonRequestUsers
pub fn new(request_id: RequestId) -> KeyboardButtonRequestUsers
Creates a new KeyboardButtonRequestUsers.
Sourcepub fn user_is_bot(self, value: bool) -> KeyboardButtonRequestUsers
pub fn user_is_bot(self, value: bool) -> KeyboardButtonRequestUsers
Setter for user_is_bot field
Setter for user_is_premium field
Sourcepub fn max_quantity(self, value: u8) -> KeyboardButtonRequestUsers
pub fn max_quantity(self, value: u8) -> KeyboardButtonRequestUsers
Setter for max_quantity field, the value must be in the range 1..=10
Sourcepub fn request_name(self) -> KeyboardButtonRequestUsers
pub fn request_name(self) -> KeyboardButtonRequestUsers
Setter for request_name field
Sourcepub fn request_username(self) -> KeyboardButtonRequestUsers
pub fn request_username(self) -> KeyboardButtonRequestUsers
Setter for request_username field
Sourcepub fn request_photo(self) -> KeyboardButtonRequestUsers
pub fn request_photo(self) -> KeyboardButtonRequestUsers
Setter for request_photo field
Trait Implementations§
Source§impl Clone for KeyboardButtonRequestUsers
impl Clone for KeyboardButtonRequestUsers
Source§fn clone(&self) -> KeyboardButtonRequestUsers
fn clone(&self) -> KeyboardButtonRequestUsers
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KeyboardButtonRequestUsers
impl Debug for KeyboardButtonRequestUsers
Source§impl<'de> Deserialize<'de> for KeyboardButtonRequestUsers
impl<'de> Deserialize<'de> for KeyboardButtonRequestUsers
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyboardButtonRequestUsers, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyboardButtonRequestUsers, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for KeyboardButtonRequestUsers
impl Hash for KeyboardButtonRequestUsers
Source§impl Serialize for KeyboardButtonRequestUsers
impl Serialize for KeyboardButtonRequestUsers
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,
impl Eq for KeyboardButtonRequestUsers
impl StructuralPartialEq for KeyboardButtonRequestUsers
Auto Trait Implementations§
impl Freeze for KeyboardButtonRequestUsers
impl RefUnwindSafe for KeyboardButtonRequestUsers
impl Send for KeyboardButtonRequestUsers
impl Sync for KeyboardButtonRequestUsers
impl Unpin for KeyboardButtonRequestUsers
impl UnwindSafe for KeyboardButtonRequestUsers
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> 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.Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more