Struct frankenstein::objects::Chat

source ·
pub struct Chat {
Show 42 fields pub id: i64, pub type_field: ChatType, pub title: Option<String>, pub username: Option<String>, pub first_name: Option<String>, pub last_name: Option<String>, pub is_forum: Option<bool>, pub photo: Option<ChatPhoto>, pub active_usernames: Option<Vec<String>>, pub birthdate: Option<Birthdate>, pub business_intro: Option<BusinessIntro>, pub business_location: Option<BusinessLocation>, pub business_opening_hours: Option<BusinessOpeningHours>, pub personal_chat: Option<Box<Chat>>, pub available_reactions: Option<Vec<ReactionType>>, pub accent_color_id: Option<u16>, pub background_custom_emoji_id: Option<String>, pub profile_accent_color_id: Option<u16>, pub profile_background_custom_emoji_id: Option<String>, pub emoji_status_custom_emoji_id: Option<String>, pub emoji_status_expiration_date: Option<u32>, pub bio: Option<String>, pub has_private_forwards: Option<bool>, pub has_restricted_voice_and_video_messages: Option<bool>, pub join_to_send_messages: Option<bool>, pub join_by_request: Option<bool>, pub description: Option<String>, pub invite_link: Option<String>, pub pinned_message: Option<Box<Message>>, pub permissions: Option<ChatPermissions>, pub slow_mode_delay: Option<u16>, pub unrestrict_boost_count: Option<u32>, pub message_auto_delete_time: Option<u32>, pub has_aggressive_anti_spam_enabled: Option<bool>, pub has_hidden_members: Option<bool>, pub has_protected_content: Option<bool>, pub has_visible_history: Option<bool>, pub sticker_set_name: Option<String>, pub can_set_sticker_set: Option<bool>, pub custom_emoji_sticker_set_name: Option<String>, pub linked_chat_id: Option<i64>, pub location: Option<ChatLocation>,
}

Fields§

§id: i64§type_field: ChatType§title: Option<String>§username: Option<String>§first_name: Option<String>§last_name: Option<String>§is_forum: Option<bool>§photo: Option<ChatPhoto>§active_usernames: Option<Vec<String>>§birthdate: Option<Birthdate>§business_intro: Option<BusinessIntro>§business_location: Option<BusinessLocation>§business_opening_hours: Option<BusinessOpeningHours>§personal_chat: Option<Box<Chat>>§available_reactions: Option<Vec<ReactionType>>§accent_color_id: Option<u16>§background_custom_emoji_id: Option<String>§profile_accent_color_id: Option<u16>§profile_background_custom_emoji_id: Option<String>§emoji_status_custom_emoji_id: Option<String>§emoji_status_expiration_date: Option<u32>§bio: Option<String>§has_private_forwards: Option<bool>§has_restricted_voice_and_video_messages: Option<bool>§join_to_send_messages: Option<bool>§join_by_request: Option<bool>§description: Option<String>§invite_link: Option<String>§pinned_message: Option<Box<Message>>§permissions: Option<ChatPermissions>§slow_mode_delay: Option<u16>§unrestrict_boost_count: Option<u32>§message_auto_delete_time: Option<u32>§has_aggressive_anti_spam_enabled: Option<bool>§has_hidden_members: Option<bool>§has_protected_content: Option<bool>§has_visible_history: Option<bool>§sticker_set_name: Option<String>§can_set_sticker_set: Option<bool>§custom_emoji_sticker_set_name: Option<String>§linked_chat_id: Option<i64>§location: Option<ChatLocation>

Implementations§

source§

impl Chat

source

pub fn builder( ) -> ChatBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>

Create a builder for building Chat. On the builder, call .id(...), .type_field(...), .title(...)(optional), .username(...)(optional), .first_name(...)(optional), .last_name(...)(optional), .is_forum(...)(optional), .photo(...)(optional), .active_usernames(...)(optional), .birthdate(...)(optional), .business_intro(...)(optional), .business_location(...)(optional), .business_opening_hours(...)(optional), .personal_chat(...)(optional), .available_reactions(...)(optional), .accent_color_id(...)(optional), .background_custom_emoji_id(...)(optional), .profile_accent_color_id(...)(optional), .profile_background_custom_emoji_id(...)(optional), .emoji_status_custom_emoji_id(...)(optional), .emoji_status_expiration_date(...)(optional), .bio(...)(optional), .has_private_forwards(...)(optional), .has_restricted_voice_and_video_messages(...)(optional), .join_to_send_messages(...)(optional), .join_by_request(...)(optional), .description(...)(optional), .invite_link(...)(optional), .pinned_message(...)(optional), .permissions(...)(optional), .slow_mode_delay(...)(optional), .unrestrict_boost_count(...)(optional), .message_auto_delete_time(...)(optional), .has_aggressive_anti_spam_enabled(...)(optional), .has_hidden_members(...)(optional), .has_protected_content(...)(optional), .has_visible_history(...)(optional), .sticker_set_name(...)(optional), .can_set_sticker_set(...)(optional), .custom_emoji_sticker_set_name(...)(optional), .linked_chat_id(...)(optional), .location(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of Chat.

Trait Implementations§

source§

impl Clone for Chat

source§

fn clone(&self) -> Chat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Chat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Chat

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Chat

source§

fn eq(&self, other: &Chat) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Chat

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for Chat

Auto Trait Implementations§

§

impl Freeze for Chat

§

impl RefUnwindSafe for Chat

§

impl Send for Chat

§

impl Sync for Chat

§

impl Unpin for Chat

§

impl UnwindSafe for Chat

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,