[][src]Enum rtdlib::types::NotificationType

pub enum NotificationType {
    NewCall(NotificationTypeNewCall),
    NewMessage(NotificationTypeNewMessage),
    NewPushMessage(NotificationTypeNewPushMessage),
    NewSecretChat(NotificationTypeNewSecretChat),
    // some variants omitted
}

Contains detailed information about a notification

Variants

New call was received

New message was received

New message was received through a push notification

New secret chat was created

Implementations

impl NotificationType[src]

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

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

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

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

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

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

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

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

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

pub fn as_new_call(&self) -> Option<&NotificationTypeNewCall>[src]

pub fn as_new_message(&self) -> Option<&NotificationTypeNewMessage>[src]

pub fn as_new_push_message(&self) -> Option<&NotificationTypeNewPushMessage>[src]

pub fn as_new_secret_chat(&self) -> Option<&NotificationTypeNewSecretChat>[src]

pub fn new_call<T: AsRef<NotificationTypeNewCall>>(t: T) -> Self[src]

pub fn new_message<T: AsRef<NotificationTypeNewMessage>>(t: T) -> Self[src]

pub fn new_push_message<T: AsRef<NotificationTypeNewPushMessage>>(t: T) -> Self[src]

pub fn new_secret_chat<T: AsRef<NotificationTypeNewSecretChat>>(t: T) -> Self[src]

Trait Implementations

impl AsRef<NotificationType> for NotificationType[src]

impl Clone for NotificationType[src]

impl Debug for NotificationType[src]

impl Default for NotificationType[src]

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

impl RObject for NotificationType[src]

impl Serialize for NotificationType[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.