Struct teloxide::payloads::CreateChatInviteLink
source · [−]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
sourceimpl CreateChatInviteLink
impl CreateChatInviteLink
pub fn new(chat_id: impl Into<Recipient>) -> CreateChatInviteLinkⓘNotable traits for CreateChatInviteLinkimpl Payload for CreateChatInviteLink type Output = ChatInviteLink;
Trait Implementations
sourceimpl Clone for CreateChatInviteLink
impl Clone for CreateChatInviteLink
sourcefn clone(&self) -> CreateChatInviteLinkⓘNotable traits for CreateChatInviteLinkimpl Payload for CreateChatInviteLink type Output = ChatInviteLink;
fn clone(&self) -> CreateChatInviteLinkⓘNotable traits for CreateChatInviteLinkimpl Payload for CreateChatInviteLink type Output = ChatInviteLink;
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for CreateChatInviteLink
impl Debug for CreateChatInviteLink
sourceimpl Hash for CreateChatInviteLink
impl Hash for CreateChatInviteLink
sourceimpl PartialEq<CreateChatInviteLink> for CreateChatInviteLink
impl PartialEq<CreateChatInviteLink> for CreateChatInviteLink
sourcefn eq(&self, other: &CreateChatInviteLink) -> bool
fn eq(&self, other: &CreateChatInviteLink) -> bool
sourceimpl Payload for CreateChatInviteLink
impl Payload for CreateChatInviteLink
type Output = ChatInviteLink
type Output = ChatInviteLink
The return type of a Telegram method. Read more
sourcefn 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. Read moresourceimpl Serialize for CreateChatInviteLink
impl Serialize for CreateChatInviteLink
sourcefn 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
impl Eq for CreateChatInviteLink
impl StructuralEq for CreateChatInviteLink
impl StructuralPartialEq for CreateChatInviteLink
Auto Trait Implementations
impl RefUnwindSafe for CreateChatInviteLink
impl Send for CreateChatInviteLink
impl Sync for CreateChatInviteLink
impl Unpin for CreateChatInviteLink
impl UnwindSafe for CreateChatInviteLink
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<P> CreateChatInviteLinkSetters for Pwhere
P: HasPayload<Payload = CreateChatInviteLink>,
impl<P> CreateChatInviteLinkSetters for Pwhere
P: HasPayload<Payload = CreateChatInviteLink>,
sourcefn expire_date<T>(self, value: T) -> Selfwhere
T: Into<DateTime<Utc>>,
fn expire_date<T>(self, value: T) -> Selfwhere
T: Into<DateTime<Utc>>,
Setter for
expire_date field.sourcefn member_limit(self, value: u32) -> Self
fn member_limit(self, value: u32) -> Self
Setter for
member_limit field.sourcefn creates_join_request(self, value: bool) -> Self
fn creates_join_request(self, value: bool) -> Self
Setter for
creates_join_request field.sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> Erasable for T
impl<T> Erasable for T
sourceimpl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
type Payload = P
type Payload = P
The type of the payload contained.
sourcefn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Gain mutable access to the underlying payload.
sourcefn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
Gain immutable access to the underlying payload.
sourcefn with_payload_mut<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut Self::Payload),
fn with_payload_mut<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut Self::Payload),
Update payload with a function