pub struct Supergroup {
    pub id: i32,
    pub username: String,
    pub date: i32,
    pub status: ChatMemberStatus,
    pub member_count: i32,
    pub anyone_can_invite: bool,
    pub sign_messages: bool,
    pub is_channel: bool,
    pub is_verified: bool,
    pub restriction_reason: String,
}
Expand description

Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers

Fields

id: i32

Supergroup or channel identifier

username: String

Username of the supergroup or channel; empty for private supergroups or channels

date: i32

Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member

status: ChatMemberStatus

Status of the current user in the supergroup or channel

member_count: i32

Member count; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats

anyone_can_invite: bool

True, if any member of the supergroup can invite other members. This field has no meaning for channels

sign_messages: bool

True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels

is_channel: bool

True, if the supergroup is a channel

is_verified: bool

True, if the supergroup or channel is verified

restriction_reason: String

If non-empty, contains the reason why access to this supergroup or channel must be restricted. Format of the string is “{type}: {description}”. {type} Contains the type of the restriction and at least one of the suffixes “-all”, “-ios”, “-android”, or “-wp”, which describe the platforms on which access should be restricted. (For example, “terms-ios-android”. {description} contains a human-readable description of the restriction, which can be shown to the user)

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.