Struct carapax::types::CreateChatInviteLink
source · pub struct CreateChatInviteLink { /* private fields */ }
Expand description
Creates an additional invite link for a chat.
The bot must be an administrator in the chat for this to work
and must have the appropriate admin rights.
The link can be revoked using the method RevokeChatInviteLink
.
Returns the new invite link as ChatInviteLink
object.
Implementations§
source§impl CreateChatInviteLink
impl CreateChatInviteLink
sourcepub fn new<T>(chat_id: T) -> CreateChatInviteLink
pub fn new<T>(chat_id: T) -> CreateChatInviteLink
sourcepub fn with_creates_join_request(self, value: bool) -> CreateChatInviteLink
pub fn with_creates_join_request(self, value: bool) -> CreateChatInviteLink
Sets a new value for a creates_join_request
flag.
value
- Indicates whether users joining the chat via the link need to be approved by chat administrators; iftrue
, member_limit can’t be specified.
sourcepub fn with_expire_date(self, value: i64) -> CreateChatInviteLink
pub fn with_expire_date(self, value: i64) -> CreateChatInviteLink
Sets a new expiration date.
§Arguments
value
- The point in time (Unix timestamp) when the link will expire.
sourcepub fn with_member_limit(self, value: i64) -> CreateChatInviteLink
pub fn with_member_limit(self, value: i64) -> CreateChatInviteLink
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.
Trait Implementations§
source§impl Clone for CreateChatInviteLink
impl Clone for CreateChatInviteLink
source§fn clone(&self) -> CreateChatInviteLink
fn clone(&self) -> CreateChatInviteLink
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CreateChatInviteLink
impl Debug for CreateChatInviteLink
source§impl Method for CreateChatInviteLink
impl Method for CreateChatInviteLink
§type Response = ChatInviteLink
type Response = ChatInviteLink
The type representing a successful result in an API response.
source§fn into_payload(self) -> Payload
fn into_payload(self) -> Payload
Converts the method into a payload for an HTTP request.
source§impl Serialize for CreateChatInviteLink
impl Serialize for CreateChatInviteLink
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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CreateChatInviteLink
impl RefUnwindSafe for CreateChatInviteLink
impl Send for CreateChatInviteLink
impl Sync for CreateChatInviteLink
impl Unpin for CreateChatInviteLink
impl UnwindSafe for CreateChatInviteLink
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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