#[non_exhaustive]pub struct GuildTemplate {
pub code: CompactString,
pub name: CompactString,
pub description: Option<CompactString>,
pub usage_count: u32,
pub creator_id: UserId,
pub creator: User,
pub created_at: Timestamp,
pub updated_at: Timestamp,
pub source_guild_id: GuildId,
pub serialized_source_guild: SerializedSourceGuild,
pub is_dirty: Option<bool>,
}Expand description
discord.js counterpart: GuildTemplate.
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.code: CompactStringThe template code (its unique ID), as in discord.new/{code}.
name: CompactStringThe template’s name.
description: Option<CompactString>The template’s description.
usage_count: u32How many times the template has been used.
creator_id: UserIdThe user who created the template.
creator: UserThe user who created the template.
created_at: TimestampWhen the template was created.
updated_at: TimestampWhen the template was last synced with its source guild.
source_guild_id: GuildIdThe guild the template was made from.
serialized_source_guild: SerializedSourceGuildThe snapshot of the source guild.
is_dirty: Option<bool>Whether the source guild has changes that are not synced into the template yet.
Trait Implementations§
Source§impl Clone for GuildTemplate
impl Clone for GuildTemplate
Source§impl Debug for GuildTemplate
impl Debug for GuildTemplate
Source§impl<'de> Deserialize<'de> for GuildTemplate
impl<'de> Deserialize<'de> for GuildTemplate
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 GuildTemplate
Source§impl PartialEq for GuildTemplate
impl PartialEq for GuildTemplate
Source§impl Serialize for GuildTemplate
impl Serialize for GuildTemplate
impl StructuralPartialEq for GuildTemplate
Auto Trait Implementations§
impl Freeze for GuildTemplate
impl RefUnwindSafe for GuildTemplate
impl Send for GuildTemplate
impl Sync for GuildTemplate
impl Unpin for GuildTemplate
impl UnsafeUnpin for GuildTemplate
impl UnwindSafe for GuildTemplate
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