#[non_exhaustive]pub struct InviteWithMetadata {
pub invite: Invite,
pub metadata: Option<InviteMetadata>,
}Expand description
An invite together with its metadata, as returned by the endpoints that create or list invites of a guild or channel.
The metadata is optional (D-117): Get Guild Invites only includes it when the bot has
MANAGE_GUILD. Dereferences to the Invite.
discord.js counterpart: Invite (with uses, maxUses, …).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.invite: InviteThe invite.
metadata: Option<InviteMetadata>The usage statistics, when Discord sends them.
Trait Implementations§
Source§impl Clone for InviteWithMetadata
impl Clone for InviteWithMetadata
Source§impl Debug for InviteWithMetadata
impl Debug for InviteWithMetadata
Source§impl Deref for InviteWithMetadata
impl Deref for InviteWithMetadata
Source§impl<'de> Deserialize<'de> for InviteWithMetadata
impl<'de> Deserialize<'de> for InviteWithMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for InviteWithMetadata
Source§impl PartialEq for InviteWithMetadata
impl PartialEq for InviteWithMetadata
Source§impl Serialize for InviteWithMetadata
impl Serialize for InviteWithMetadata
impl StructuralPartialEq for InviteWithMetadata
Auto Trait Implementations§
impl Forget for InviteWithMetadata
impl Freeze for InviteWithMetadata
impl Move for InviteWithMetadata
impl RefUnwindSafe for InviteWithMetadata
impl Send for InviteWithMetadata
impl Sync for InviteWithMetadata
impl Unpin for InviteWithMetadata
impl UnsafeUnpin for InviteWithMetadata
impl UnwindSafe for InviteWithMetadata
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