Struct botapi::gen_types::ChatInviteLinkBuilder
source · pub struct ChatInviteLinkBuilder {
pub invite_link: String,
pub creator: BoxWrapper<Unbox<User>>,
pub creates_join_request: bool,
pub is_primary: bool,
pub is_revoked: bool,
pub name: Option<String>,
pub expire_date: Option<i64>,
pub member_limit: Option<i64>,
pub pending_join_request_count: Option<i64>,
}
Expand description
Represents an invite link for a chat.
Fields§
§invite_link: String
The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.
creator: BoxWrapper<Unbox<User>>
Creator of the link
creates_join_request: bool
True, if users joining the chat via the link need to be approved by chat administrators
is_primary: bool
True, if the link is primary
is_revoked: bool
True, if the link is revoked
name: Option<String>
Optional. Invite link name
expire_date: Option<i64>
Optional. Point in time (Unix timestamp) when the link will expire or has been expired
member_limit: Option<i64>
Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
pending_join_request_count: Option<i64>
Optional. Number of pending join requests created using this link
Implementations§
source§impl ChatInviteLinkBuilder
impl ChatInviteLinkBuilder
pub fn new<A: Into<User>>( invite_link: String, creator: A, creates_join_request: bool, is_primary: bool, is_revoked: bool, ) -> Self
sourcepub fn set_invite_link(self, invite_link: String) -> Self
pub fn set_invite_link(self, invite_link: String) -> Self
The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.
sourcepub fn set_creator(self, creator: User) -> Self
pub fn set_creator(self, creator: User) -> Self
Creator of the link
sourcepub fn set_creates_join_request(self, creates_join_request: bool) -> Self
pub fn set_creates_join_request(self, creates_join_request: bool) -> Self
True, if users joining the chat via the link need to be approved by chat administrators
sourcepub fn set_is_primary(self, is_primary: bool) -> Self
pub fn set_is_primary(self, is_primary: bool) -> Self
True, if the link is primary
sourcepub fn set_is_revoked(self, is_revoked: bool) -> Self
pub fn set_is_revoked(self, is_revoked: bool) -> Self
True, if the link is revoked
sourcepub fn set_expire_date(self, expire_date: i64) -> Self
pub fn set_expire_date(self, expire_date: i64) -> Self
Optional. Point in time (Unix timestamp) when the link will expire or has been expired
sourcepub fn set_member_limit(self, member_limit: i64) -> Self
pub fn set_member_limit(self, member_limit: i64) -> Self
Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
sourcepub fn set_pending_join_request_count(
self,
pending_join_request_count: i64,
) -> Self
pub fn set_pending_join_request_count( self, pending_join_request_count: i64, ) -> Self
Optional. Number of pending join requests created using this link
pub fn build(self) -> ChatInviteLink
Trait Implementations§
source§impl Clone for ChatInviteLinkBuilder
impl Clone for ChatInviteLinkBuilder
source§fn clone(&self) -> ChatInviteLinkBuilder
fn clone(&self) -> ChatInviteLinkBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChatInviteLinkBuilder
impl Debug for ChatInviteLinkBuilder
source§impl Default for ChatInviteLinkBuilder
impl Default for ChatInviteLinkBuilder
source§fn default() -> ChatInviteLinkBuilder
fn default() -> ChatInviteLinkBuilder
source§impl<'de> Deserialize<'de> for ChatInviteLinkBuilder
impl<'de> Deserialize<'de> for ChatInviteLinkBuilder
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Hash for ChatInviteLinkBuilder
impl Hash for ChatInviteLinkBuilder
source§impl Ord for ChatInviteLinkBuilder
impl Ord for ChatInviteLinkBuilder
source§fn cmp(&self, other: &ChatInviteLinkBuilder) -> Ordering
fn cmp(&self, other: &ChatInviteLinkBuilder) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ChatInviteLinkBuilder
impl PartialEq for ChatInviteLinkBuilder
source§fn eq(&self, other: &ChatInviteLinkBuilder) -> bool
fn eq(&self, other: &ChatInviteLinkBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ChatInviteLinkBuilder
impl PartialOrd for ChatInviteLinkBuilder
source§fn partial_cmp(&self, other: &ChatInviteLinkBuilder) -> Option<Ordering>
fn partial_cmp(&self, other: &ChatInviteLinkBuilder) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ChatInviteLinkBuilder
impl Serialize for ChatInviteLinkBuilder
impl Eq for ChatInviteLinkBuilder
impl StructuralPartialEq for ChatInviteLinkBuilder
Auto Trait Implementations§
impl Freeze for ChatInviteLinkBuilder
impl RefUnwindSafe for ChatInviteLinkBuilder
impl Send for ChatInviteLinkBuilder
impl Sync for ChatInviteLinkBuilder
impl Unpin for ChatInviteLinkBuilder
impl UnwindSafe for ChatInviteLinkBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.