[][src]Enum tbot::types::keyboard::reply::RequestKind

#[must_use]pub enum RequestKind {
    Location,
    Contact,
    Poll(RequestPollKind),
}

Represents different information that a Button can request.

Variants

Location

Requests a location from the user.

Contact

Requests a contact from the user.

Requests a poll from the user.

Implementations

impl RequestKind[src]

pub fn is_location(&self) -> bool[src]

Returns true if self is of variant Location.

pub fn is_contact(&self) -> bool[src]

Returns true if self is of variant Contact.

pub fn is_poll(&self) -> bool[src]

Returns true if self is of variant Poll.

pub fn expect_poll(self) -> RequestPollKind where
    Self: Debug
[src]

Unwraps the value, yielding the content of Poll.

Panics

Panics if the value is not Poll, with a panic message including the content of self.

pub fn poll(self) -> Option<RequestPollKind>[src]

Returns Some if self is of variant Poll, and None otherwise.

Trait Implementations

impl Clone for RequestKind[src]

impl Copy for RequestKind[src]

impl Debug for RequestKind[src]

impl Eq for RequestKind[src]

impl Hash for RequestKind[src]

impl PartialEq<RequestKind> for RequestKind[src]

impl StructuralEq for RequestKind[src]

impl StructuralPartialEq for RequestKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithSubscriber for T[src]