pub struct CreateChatInviteLink {
pub chat_id: Recipient,
pub name: Option<String>,
pub expire_date: Option<DateTime<Utc>>,
pub member_limit: Option<u32>,
pub creates_join_request: Option<bool>,
}Expand description
Use this method to create 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.
Fields§
§chat_id: RecipientUnique identifier for the target chat or username of the target channel (in the format @channelusername)
name: Option<String>Invite link name; 0-32 characters
expire_date: Option<DateTime<Utc>>Point in time (Unix timestamp) when the link will expire
member_limit: Option<u32>Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
creates_join_request: Option<bool>True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can’t be specified
Implementations§
Trait Implementations§
Source§impl Clone for CreateChatInviteLink
impl Clone for CreateChatInviteLink
Source§impl Debug for CreateChatInviteLink
impl Debug for CreateChatInviteLink
impl Eq for CreateChatInviteLink
Source§impl Hash for CreateChatInviteLink
impl Hash for CreateChatInviteLink
Source§impl PartialEq for CreateChatInviteLink
impl PartialEq for CreateChatInviteLink
Source§impl Payload for CreateChatInviteLink
impl Payload for CreateChatInviteLink
Source§const NAME: &'static str = "CreateChatInviteLink"
const NAME: &'static str = "CreateChatInviteLink"
Name of the Rust payload (for example,
EditMessageTextInline).Source§type Output = ChatInviteLink
type Output = ChatInviteLink
The return type of a Telegram method. Read more
Source§const TELEGRAM_METHOD: &'static str = Self::NAME
const TELEGRAM_METHOD: &'static str = Self::NAME
Case-insensitive Telegram method called on the wire (for example,
EditMessageText). Defaults to the payload name.Source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates with
big timeout), the minimum timeout that should be used.Source§impl Serialize for CreateChatInviteLink
impl Serialize for CreateChatInviteLink
impl StructuralPartialEq for CreateChatInviteLink
Auto Trait Implementations§
impl Forget for CreateChatInviteLink
impl Freeze for CreateChatInviteLink
impl Move for CreateChatInviteLink
impl RefUnwindSafe for CreateChatInviteLink
impl Send for CreateChatInviteLink
impl Sync for CreateChatInviteLink
impl Unpin for CreateChatInviteLink
impl UnsafeUnpin for CreateChatInviteLinkwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P> CreateChatInviteLinkSetters for Pwhere
P: HasPayload<Payload = CreateChatInviteLink>,
impl<P> CreateChatInviteLinkSetters for Pwhere
P: HasPayload<Payload = CreateChatInviteLink>,
Source§fn expire_date<T>(self, value: T) -> Self
fn expire_date<T>(self, value: T) -> Self
Setter for
expire_date field.Source§fn member_limit(self, value: u32) -> Self
fn member_limit(self, value: u32) -> Self
Setter for
member_limit field.Source§fn creates_join_request(self, value: bool) -> Self
fn creates_join_request(self, value: bool) -> Self
Setter for
creates_join_request field.Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
Source§fn payload_mut(&mut self) -> &mut P
fn payload_mut(&mut self) -> &mut P
Gain mutable access to the underlying payload.
Source§fn payload_ref(&self) -> &P
fn payload_ref(&self) -> &P
Gain immutable access to the underlying payload.
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