[−][src]Enum rtdlib::types::KeyboardButtonType  
Describes a keyboard button type
Variants
Text(KeyboardButtonTypeText)A simple button, with text that should be sent when the button is pressed
RequestPhoneNumber(KeyboardButtonTypeRequestPhoneNumber)A button that sends the user's phone number when pressed; available only in private chats
RequestLocation(KeyboardButtonTypeRequestLocation)A button that sends the user's location when pressed; available only in private chats
Methods
impl KeyboardButtonType[src]
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>[src]
pub fn is_text(&self) -> bool[src]
pub fn is_request_phone_number(&self) -> bool[src]
pub fn is_request_location(&self) -> bool[src]
pub fn on_text<F: FnOnce(&KeyboardButtonTypeText)>(&self, fnc: F) -> &Self[src]
pub fn on_request_phone_number<F: FnOnce(&KeyboardButtonTypeRequestPhoneNumber)>(
    &self, 
    fnc: F
) -> &Self[src]
&self,
fnc: F
) -> &Self
pub fn on_request_location<F: FnOnce(&KeyboardButtonTypeRequestLocation)>(
    &self, 
    fnc: F
) -> &Self[src]
&self,
fnc: F
) -> &Self
pub fn as_text(&self) -> Option<&KeyboardButtonTypeText>[src]
pub fn as_request_phone_number(
    &self
) -> Option<&KeyboardButtonTypeRequestPhoneNumber>[src]
&self
) -> Option<&KeyboardButtonTypeRequestPhoneNumber>
pub fn as_request_location(&self) -> Option<&KeyboardButtonTypeRequestLocation>[src]
pub fn text<T: AsRef<KeyboardButtonTypeText>>(t: T) -> Self[src]
pub fn request_phone_number<T: AsRef<KeyboardButtonTypeRequestPhoneNumber>>(
    t: T
) -> Self[src]
t: T
) -> Self
pub fn request_location<T: AsRef<KeyboardButtonTypeRequestLocation>>(
    t: T
) -> Self[src]
t: T
) -> Self
Trait Implementations
impl RObject for KeyboardButtonType[src]
impl Default for KeyboardButtonType[src]
impl Clone for KeyboardButtonType[src]
fn clone(&self) -> KeyboardButtonType[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl AsRef<KeyboardButtonType> for KeyboardButtonType[src]
fn as_ref(&self) -> &KeyboardButtonType[src]
impl Debug for KeyboardButtonType[src]
impl Serialize for KeyboardButtonType[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer, [src]
__S: Serializer,
impl<'de> Deserialize<'de> for KeyboardButtonType[src]
fn deserialize<D>(deserializer: D) -> Result<KeyboardButtonType, D::Error> where
    D: Deserializer<'de>, [src]
D: Deserializer<'de>,
Auto Trait Implementations
impl Send for KeyboardButtonType
impl Unpin for KeyboardButtonType
impl Sync for KeyboardButtonType
impl UnwindSafe for KeyboardButtonType
impl RefUnwindSafe for KeyboardButtonType
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
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> Any for T where
    T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, [src]
T: Deserialize<'de>,