[][src]Struct teloxide::types::Chat

#[non_exhaustive]pub struct Chat {
    pub id: i64,
    pub kind: ChatKind,
    pub photo: Option<ChatPhoto>,
}

This object represents a chat.

The official docs.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
id: i64

A unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

kind: ChatKindphoto: Option<ChatPhoto>

A chat photo. Returned only in Bot::get_chat.

Implementations

impl Chat[src]

pub fn new(id: i64, kind: ChatKind) -> Self[src]

pub fn id(self, val: i64) -> Self[src]

pub fn kind(self, val: ChatKind) -> Self[src]

pub fn photo(self, val: ChatPhoto) -> Self[src]

impl Chat[src]

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

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

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

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

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

Trait Implementations

impl Clone for Chat[src]

impl Debug for Chat[src]

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

impl PartialEq<Chat> for Chat[src]

impl Serialize for Chat[src]

impl StructuralPartialEq for Chat[src]

Auto Trait Implementations

impl RefUnwindSafe for Chat

impl Send for Chat

impl Sync for Chat

impl Unpin for Chat

impl UnwindSafe for Chat

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> 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.