Struct carapax::types::ChatInviteLink
source · pub struct ChatInviteLink {
pub creates_join_request: bool,
pub creator: User,
pub invite_link: String,
pub is_primary: bool,
pub is_revoked: bool,
pub expire_date: Option<i64>,
pub member_limit: Option<i64>,
pub name: Option<String>,
pub pending_join_request_count: Option<i64>,
}
Expand description
Represents an invite link for a chat.
Fields§
§creates_join_request: bool
Indicates whether users joining the chat via the link need to be approved by chat administrators.
creator: User
The creator of the link.
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 “…”.
is_primary: bool
Indicates whether the link is primary.
is_revoked: bool
Indicates whether the link is revoked.
expire_date: Option<i64>
The point in time (Unix timestamp) when the link will expire or has been expired.
member_limit: Option<i64>
The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999.
name: Option<String>
The name of the invite link.
pending_join_request_count: Option<i64>
The number of pending join requests created using this link.
Implementations§
source§impl ChatInviteLink
impl ChatInviteLink
sourcepub fn new<T>(invite_link: T, creator: User) -> ChatInviteLink
pub fn new<T>(invite_link: T, creator: User) -> ChatInviteLink
sourcepub fn with_creates_join_request(self, value: bool) -> ChatInviteLink
pub fn with_creates_join_request(self, value: bool) -> ChatInviteLink
Sets a new value for a creates_join_request
flag.
§Arguments
value
- Indicates whether users joining the chat via the link need to be approved by chat administrators.
sourcepub fn with_expire_date(self, value: i64) -> ChatInviteLink
pub fn with_expire_date(self, value: i64) -> ChatInviteLink
Sets a new expiration date.
§Arguments
value
- The point in time (Unix timestamp) when the link will expire or has been expired.
sourcepub fn with_is_primary(self, value: bool) -> ChatInviteLink
pub fn with_is_primary(self, value: bool) -> ChatInviteLink
sourcepub fn with_is_revoked(self, value: bool) -> ChatInviteLink
pub fn with_is_revoked(self, value: bool) -> ChatInviteLink
sourcepub fn with_member_limit(self, value: i64) -> ChatInviteLink
pub fn with_member_limit(self, value: i64) -> ChatInviteLink
Sets a new member limit
§Arguments
value
- 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 with_name<T>(self, value: T) -> ChatInviteLink
pub fn with_name<T>(self, value: T) -> ChatInviteLink
sourcepub fn with_pending_join_request_count(self, value: i64) -> ChatInviteLink
pub fn with_pending_join_request_count(self, value: i64) -> ChatInviteLink
Sets a new pending join requests count.
§Arguments
value
- The number of pending join requests created using this link.
Trait Implementations§
source§impl Clone for ChatInviteLink
impl Clone for ChatInviteLink
source§fn clone(&self) -> ChatInviteLink
fn clone(&self) -> ChatInviteLink
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChatInviteLink
impl Debug for ChatInviteLink
source§impl<'de> Deserialize<'de> for ChatInviteLink
impl<'de> Deserialize<'de> for ChatInviteLink
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ChatInviteLink, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ChatInviteLink, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for ChatInviteLink
impl PartialEq for ChatInviteLink
source§fn eq(&self, other: &ChatInviteLink) -> bool
fn eq(&self, other: &ChatInviteLink) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ChatInviteLink
impl PartialOrd for ChatInviteLink
source§fn partial_cmp(&self, other: &ChatInviteLink) -> Option<Ordering>
fn partial_cmp(&self, other: &ChatInviteLink) -> 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 ChatInviteLink
impl Serialize for ChatInviteLink
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ChatInviteLink
Auto Trait Implementations§
impl Freeze for ChatInviteLink
impl RefUnwindSafe for ChatInviteLink
impl Send for ChatInviteLink
impl Sync for ChatInviteLink
impl Unpin for ChatInviteLink
impl UnwindSafe for ChatInviteLink
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more