[][src]Enum rtdlib::types::PublicChatType

pub enum PublicChatType {
    HasUsername(PublicChatTypeHasUsername),
    IsLocationBased(PublicChatTypeIsLocationBased),
    // some variants omitted
}

Describes a type of public chats

Variants

The chat is public, because it has username

The chat is public, because it is a location-based supergroup

Implementations

impl PublicChatType[src]

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

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

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

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

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

pub fn as_has_username(&self) -> Option<&PublicChatTypeHasUsername>[src]

pub fn as_is_location_based(&self) -> Option<&PublicChatTypeIsLocationBased>[src]

pub fn has_username<T: AsRef<PublicChatTypeHasUsername>>(t: T) -> Self[src]

pub fn is_location_based<T: AsRef<PublicChatTypeIsLocationBased>>(t: T) -> Self[src]

Trait Implementations

impl AsRef<PublicChatType> for PublicChatType[src]

impl Clone for PublicChatType[src]

impl Debug for PublicChatType[src]

impl Default for PublicChatType[src]

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

impl RObject for PublicChatType[src]

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