Struct twilight_model::gateway::payload::invite_create::InviteCreate[][src]

pub struct InviteCreate {
    pub channel_id: ChannelId,
    pub code: String,
    pub created_at: String,
    pub guild_id: GuildId,
    pub inviter: Option<User>,
    pub max_age: u64,
    pub max_uses: u64,
    pub target_user_type: Option<TargetType>,
    pub target_user: Option<PartialUser>,
    pub temporary: bool,
    pub uses: u8,
}
Expand description

A new Invite has been created.

Fields

channel_id: ChannelId

ID of the channel invited users will first see.

code: String

Unique code.

created_at: String

When the invite was created.

This is in an ISO 8601 timestamp format.

guild_id: GuildId

ID of the guild being invited to.

inviter: Option<User>

Information about the user who created the invite.

max_age: u64

Maximum age before the invite expires.

This is in seconds.

max_uses: u64

Maximum number of uses before the invite expires.

target_user_type: Option<TargetType>

Target of the invite.

target_user: Option<PartialUser>

User whose stream to display for this voice channel stream invite.

temporary: bool

Whether the invite is temporary.

Invited users will be kicked when they are disconnected from an audio channel unless they’re assigned a role.

uses: u8

Number of times the invite has been used.

This will always be zero.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.