[−][src]Enum rtdlib::types::KeyboardButtonType
Describes a keyboard button type
Variants
RequestLocation(KeyboardButtonTypeRequestLocation)
A button that sends the user's location when pressed; available only in private chats
RequestPhoneNumber(KeyboardButtonTypeRequestPhoneNumber)
A button that sends the user's phone number when pressed; available only in private chats
RequestPoll(KeyboardButtonTypeRequestPoll)
A button that allows the user to create and send a poll when pressed; available only in private chats
Text(KeyboardButtonTypeText)
A simple button, with text that should be sent when the button is pressed
Implementations
impl KeyboardButtonType
[src]
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>
[src]
pub fn is_request_location(&self) -> bool
[src]
pub fn is_request_phone_number(&self) -> bool
[src]
pub fn is_request_poll(&self) -> bool
[src]
pub fn is_text(&self) -> bool
[src]
pub fn on_request_location<F: FnOnce(&KeyboardButtonTypeRequestLocation)>(
&self,
fnc: F
) -> &Self
[src]
&self,
fnc: F
) -> &Self
pub fn on_request_phone_number<F: FnOnce(&KeyboardButtonTypeRequestPhoneNumber)>(
&self,
fnc: F
) -> &Self
[src]
&self,
fnc: F
) -> &Self
pub fn on_request_poll<F: FnOnce(&KeyboardButtonTypeRequestPoll)>(
&self,
fnc: F
) -> &Self
[src]
&self,
fnc: F
) -> &Self
pub fn on_text<F: FnOnce(&KeyboardButtonTypeText)>(&self, fnc: F) -> &Self
[src]
pub fn as_request_location(&self) -> Option<&KeyboardButtonTypeRequestLocation>
[src]
pub fn as_request_phone_number(
&self
) -> Option<&KeyboardButtonTypeRequestPhoneNumber>
[src]
&self
) -> Option<&KeyboardButtonTypeRequestPhoneNumber>
pub fn as_request_poll(&self) -> Option<&KeyboardButtonTypeRequestPoll>
[src]
pub fn as_text(&self) -> Option<&KeyboardButtonTypeText>
[src]
pub fn request_location<T: AsRef<KeyboardButtonTypeRequestLocation>>(
t: T
) -> Self
[src]
t: T
) -> Self
pub fn request_phone_number<T: AsRef<KeyboardButtonTypeRequestPhoneNumber>>(
t: T
) -> Self
[src]
t: T
) -> Self
pub fn request_poll<T: AsRef<KeyboardButtonTypeRequestPoll>>(t: T) -> Self
[src]
pub fn text<T: AsRef<KeyboardButtonTypeText>>(t: T) -> Self
[src]
Trait Implementations
impl AsRef<KeyboardButtonType> for KeyboardButtonType
[src]
fn as_ref(&self) -> &KeyboardButtonType
[src]
impl Clone for KeyboardButtonType
[src]
fn clone(&self) -> KeyboardButtonType
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for KeyboardButtonType
[src]
impl Default for KeyboardButtonType
[src]
impl<'de> Deserialize<'de> for KeyboardButtonType
[src]
fn deserialize<D>(deserializer: D) -> Result<KeyboardButtonType, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl RObject for KeyboardButtonType
[src]
impl Serialize for KeyboardButtonType
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyboardButtonType
impl Send for KeyboardButtonType
impl Sync for KeyboardButtonType
impl Unpin for KeyboardButtonType
impl UnwindSafe for KeyboardButtonType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,