#[non_exhaustive]pub struct PrimaryGuild {
pub identity_guild_id: Option<GuildId>,
pub identity_enabled: Option<bool>,
pub tag: Option<CompactString>,
pub badge: Option<ImageHash>,
}Expand description
The primary guild of a user: the guild whose server tag is shown next to their name.
discord.js counterpart: APIUserPrimaryGuild (discord-api-types).
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.identity_guild_id: Option<GuildId>The guild’s ID.
identity_enabled: Option<bool>Whether the user displays the server tag. None when Discord cleared the identity (for
example because the guild no longer supports tags).
tag: Option<CompactString>The server tag (up to 4 characters).
badge: Option<ImageHash>Trait Implementations§
Source§impl Clone for PrimaryGuild
impl Clone for PrimaryGuild
Source§impl Debug for PrimaryGuild
impl Debug for PrimaryGuild
Source§impl<'de> Deserialize<'de> for PrimaryGuild
impl<'de> Deserialize<'de> for PrimaryGuild
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 PrimaryGuild
Source§impl Hash for PrimaryGuild
impl Hash for PrimaryGuild
Source§impl PartialEq for PrimaryGuild
impl PartialEq for PrimaryGuild
Source§impl Serialize for PrimaryGuild
impl Serialize for PrimaryGuild
impl StructuralPartialEq for PrimaryGuild
Auto Trait Implementations§
impl Freeze for PrimaryGuild
impl RefUnwindSafe for PrimaryGuild
impl Send for PrimaryGuild
impl Sync for PrimaryGuild
impl Unpin for PrimaryGuild
impl UnsafeUnpin for PrimaryGuild
impl UnwindSafe for PrimaryGuild
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