Struct carapax::types::EditChatInviteLink
source · pub struct EditChatInviteLink { /* private fields */ }
Expand description
Changes a non-primary invite link created by a bot.
The bot must be an administrator in the chat for this to work
and must have the appropriate admin rights.
Returns the edited invite link as a ChatInviteLink
object.
Implementations§
source§impl EditChatInviteLink
impl EditChatInviteLink
sourcepub fn new<A, B>(chat_id: A, invite_link: B) -> EditChatInviteLink
pub fn new<A, B>(chat_id: A, invite_link: B) -> EditChatInviteLink
Creates a new EditChatInviteLink
.
§Arguments
chat_id
- Unique identifier of the target chat.invite_link
- The invite link to edit.
sourcepub fn with_creates_join_request(self, value: bool) -> EditChatInviteLink
pub fn with_creates_join_request(self, value: bool) -> EditChatInviteLink
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; iftrue
,member_limit
can’t be specified.
sourcepub fn with_expire_date(self, value: i64) -> EditChatInviteLink
pub fn with_expire_date(self, value: i64) -> EditChatInviteLink
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) -> EditChatInviteLink
pub fn with_member_limit(self, value: i64) -> EditChatInviteLink
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 EditChatInviteLink
impl Clone for EditChatInviteLink
source§fn clone(&self) -> EditChatInviteLink
fn clone(&self) -> EditChatInviteLink
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 EditChatInviteLink
impl Debug for EditChatInviteLink
source§impl Method for EditChatInviteLink
impl Method for EditChatInviteLink
§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 EditChatInviteLink
impl Serialize for EditChatInviteLink
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 EditChatInviteLink
impl RefUnwindSafe for EditChatInviteLink
impl Send for EditChatInviteLink
impl Sync for EditChatInviteLink
impl Unpin for EditChatInviteLink
impl UnwindSafe for EditChatInviteLink
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