[][src]Enum rtdlib::types::ChatActionBar

pub enum ChatActionBar {
    AddContact(ChatActionBarAddContact),
    ReportAddBlock(ChatActionBarReportAddBlock),
    ReportSpam(ChatActionBarReportSpam),
    ReportUnrelatedLocation(ChatActionBarReportUnrelatedLocation),
    SharePhoneNumber(ChatActionBarSharePhoneNumber),
    // some variants omitted
}

Describes actions which should be possible to do through a chat action bar

Variants

The chat is a private or secret chat and the other user can be added to the contact list using the method addContact

The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be added to the contact list using the method addContact, or the other user can be blocked using the method blockUser

The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam

ReportUnrelatedLocation(ChatActionBarReportUnrelatedLocation)

The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason chatReportReasonUnrelatedLocation

The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other user using the method sharePhoneNumber

Implementations

impl ChatActionBar[src]

pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>[src]

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

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

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

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

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

pub fn on_add_contact<F: FnOnce(&ChatActionBarAddContact)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_report_add_block<F: FnOnce(&ChatActionBarReportAddBlock)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_report_spam<F: FnOnce(&ChatActionBarReportSpam)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_report_unrelated_location<F: FnOnce(&ChatActionBarReportUnrelatedLocation)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_share_phone_number<F: FnOnce(&ChatActionBarSharePhoneNumber)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn as_add_contact(&self) -> Option<&ChatActionBarAddContact>[src]

pub fn as_report_add_block(&self) -> Option<&ChatActionBarReportAddBlock>[src]

pub fn as_report_spam(&self) -> Option<&ChatActionBarReportSpam>[src]

pub fn as_report_unrelated_location(
    &self
) -> Option<&ChatActionBarReportUnrelatedLocation>
[src]

pub fn as_share_phone_number(&self) -> Option<&ChatActionBarSharePhoneNumber>[src]

pub fn add_contact<T: AsRef<ChatActionBarAddContact>>(t: T) -> Self[src]

pub fn report_add_block<T: AsRef<ChatActionBarReportAddBlock>>(t: T) -> Self[src]

pub fn report_spam<T: AsRef<ChatActionBarReportSpam>>(t: T) -> Self[src]

pub fn report_unrelated_location<T: AsRef<ChatActionBarReportUnrelatedLocation>>(
    t: T
) -> Self
[src]

pub fn share_phone_number<T: AsRef<ChatActionBarSharePhoneNumber>>(t: T) -> Self[src]

Trait Implementations

impl AsRef<ChatActionBar> for ChatActionBar[src]

impl Clone for ChatActionBar[src]

impl Debug for ChatActionBar[src]

impl Default for ChatActionBar[src]

impl<'de> Deserialize<'de> for ChatActionBar[src]

impl RObject for ChatActionBar[src]

impl Serialize for ChatActionBar[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<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> 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.